gtkwindow: Do not show subsurface windows for hidden popover widgets

This is really just necessary when we have a visible widget, otherwise
the window would temporarily linger with odd size and surface.

https://bugzilla.gnome.org/show_bug.cgi?id=743427
This commit is contained in:
Carlos Garnacho 2015-02-25 15:52:49 +01:00
parent c55fcd35fe
commit d070e4c742

View File

@ -5948,16 +5948,12 @@ static void
popover_map (GtkWidget *widget,
GtkWindowPopover *popover)
{
if (popover->window)
if (popover->window && gtk_widget_get_visible (popover->widget))
{
gdk_window_show (popover->window);
if (gtk_widget_get_visible (popover->widget))
{
gtk_widget_map (popover->widget);
popover->unmap_id = g_signal_connect (popover->widget, "unmap",
G_CALLBACK (popover_unmap), popover);
}
gtk_widget_map (popover->widget);
popover->unmap_id = g_signal_connect (popover->widget, "unmap",
G_CALLBACK (popover_unmap), popover);
}
}