ui: gtk_widget_show() the MetaFrames object

The widget needs to be visible and mapped for GTK3 to deliver expose
events to the widget. This is achieved by making the map function a
no-op and calling gtk_widget_show() instead of just calling
gtk_widget_realize().
Apart from making GTK think the widget is drawable, the effect is the
same.

https://bugzilla.gnome.org/show_bug.cgi?id=630203
This commit is contained in:
Benjamin Otte
2010-09-21 12:31:32 +02:00
parent a3c6486e52
commit 5c3b0cda2e
2 changed files with 16 additions and 11 deletions

View File

@ -128,7 +128,10 @@ meta_ui_new (Display *xdisplay,
g_assert (xdisplay == GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
ui->frames = meta_frames_new (XScreenNumberOfScreen (screen));
gtk_widget_realize (GTK_WIDGET (ui->frames));
/* This does not actually show any widget. MetaFrames has been hacked so
* that showing it doesn't actually do anything. But we need the flags
* set for GTK to deliver events properly. */
gtk_widget_show (GTK_WIDGET (ui->frames));
return ui;
}