GtkWindow: Ensure the toplevel is realized before realizing popovers

Otherwise those get a NULL parent window, which is toplevel-y enough
to disembody the popover.

https://bugzilla.gnome.org/show_bug.cgi?id=764060
This commit is contained in:
Carlos Garnacho 2016-04-14 11:05:00 +02:00
parent 260d521dd7
commit 46cdb44fdd

View File

@ -12291,7 +12291,8 @@ _gtk_window_set_popover_position (GtkWindow *window,
data->rect = *rect;
data->pos = pos;
if (gtk_widget_is_visible (popover) && !data->window)
if (gtk_widget_is_visible (popover) && !data->window &&
gtk_widget_get_realized (GTK_WIDGET (window)))
{
popover_realize (popover, data, window);
popover_map (popover, data);