diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2014-03-05 15:23:46 -0500 |
---|---|---|
committer | Owen W. Taylor <otaylor@fishsoup.net> | 2014-03-05 17:21:27 -0500 |
commit | 4a8f7aa884ff531ceac0597aceade493dffe3c93 (patch) | |
tree | 5b9089d8e08b6c084730b9a65559b2ae8da99122 /src/ui/ui.c | |
parent | c8f466cb85833307ff2c958edecbd10ce7aa32e1 (diff) | |
download | mutter-4a8f7aa884ff531ceac0597aceade493dffe3c93.tar.gz |
Fix handling of dynamic updates to colors/font/etc.
Since the introduction of frame sync in GTK+, updates to titlebar font and
colors haven't been working because GTK+ counts on the frame clock to
do style updates, and the frame clock doesn't run for an unmapped
GdkWindow. (It's possible that GtkStyleContext changes subsequent to
the introduction of the frame clock were also needed to fully break
things.)
We actually need to map the MetaFrames GdkWindow and let the
compositor code send out the frame sync messages in order to pick up
style changes.
Hopefully no bad side effects will occur from this - we make the window
override-redirect, 1x1, and outside the bounds of the screen.
https://bugzilla.gnome.org/show_bug.cgi?id=725751
Diffstat (limited to 'src/ui/ui.c')
-rw-r--r-- | src/ui/ui.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ui/ui.c b/src/ui/ui.c index aa1d3bdfd..7d023dc8f 100644 --- a/src/ui/ui.c +++ b/src/ui/ui.c @@ -298,9 +298,12 @@ meta_ui_new (Display *xdisplay, g_assert (gdisplay == gdk_display_get_default ()); ui->frames = meta_frames_new (XScreenNumberOfScreen (screen)); - /* 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+ needs the frame-sync protocol to work in order to properly + * handle style changes. This means that the dummy widget we create + * to get the style for title bars actually needs to be mapped + * and fully tracked as a MetaWindow. Horrible, but mostly harmless - + * the window is a 1x1 overide redirect window positioned offscreen. + */ gtk_widget_show (GTK_WIDGET (ui->frames)); g_object_set_data (G_OBJECT (gdisplay), "meta-ui", ui); |