win32embed: Set the visible flag and avoid recursion

We have to use the internal accessor to the visible flag, instead of
calling gtk_widget_set_visible(), from within the show() and hide()
implementations - otherwise we'll recurse.

https://bugzilla.gnome.org/show_bug.cgi?id=721069
This commit is contained in:
Emmanuele Bassi 2014-03-24 20:51:42 +00:00
parent c0200b9a68
commit 61ed31a473

View File

@ -252,7 +252,7 @@ gtk_win32_embed_widget_realize (GtkWidget *widget)
static void
gtk_win32_embed_widget_show (GtkWidget *widget)
{
gtk_widget_set_visible (widget, TRUE);
_gtk_widget_set_visible_flag (widget, TRUE);
gtk_widget_realize (widget);
gtk_container_check_resize (GTK_CONTAINER (widget));
@ -262,7 +262,7 @@ gtk_win32_embed_widget_show (GtkWidget *widget)
static void
gtk_win32_embed_widget_hide (GtkWidget *widget)
{
gtk_widget_set_visible (widget, FALSE);
_gtk_widget_set_visible_flag (widget, FALSE);
gtk_widget_unmap (widget);
}