diff options
author | Ray Strode <[email protected]> | 2017-02-25 20:10:44 +0300 |
---|---|---|
committer | Alexei Sorokin <[email protected]> | 2017-02-25 20:10:44 +0300 |
commit | fc3de40af9363642ab65929a17250f3ba4477239 (patch) | |
tree | 31630658d2d411a233e40ba092cc7b3e7a595cec /libmate-desktop/mate-bg-crossfade.c | |
parent | fb9787630278dd23a6900cfc28c84be5761bc885 (diff) | |
download | mate-desktop-fc3de40af9363642ab65929a17250f3ba4477239.tar.bz2 mate-desktop-fc3de40af9363642ab65929a17250f3ba4477239.tar.xz |
mate-bg: force property update when doing new crossfade frame
marco needs to get notified about animation updates.
This commit frobs the property to wake marco up.
https://bugzilla.gnome.org/show_bug.cgi?id=641526
Diffstat (limited to 'libmate-desktop/mate-bg-crossfade.c')
-rw-r--r-- | libmate-desktop/mate-bg-crossfade.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libmate-desktop/mate-bg-crossfade.c b/libmate-desktop/mate-bg-crossfade.c index a399c1c..37fddd8 100644 --- a/libmate-desktop/mate-bg-crossfade.c +++ b/libmate-desktop/mate-bg-crossfade.c @@ -382,6 +382,20 @@ animations_are_disabled (MateBGCrossfade *fade) } static void +send_root_property_change_notification (MateBGCrossfade *fade) +{ + long zero_length_pixmap = 0; + + /* We do a zero length append to force a change notification, + * without changing the value */ + XChangeProperty (GDK_WINDOW_XDISPLAY (fade->priv->window), + GDK_WINDOW_XID (fade->priv->window), + gdk_x11_get_xatom_by_name ("_XROOTPMAP_ID"), + XA_PIXMAP, 32, PropModeAppend, + (unsigned char *) &zero_length_pixmap, 0); +} + +static void draw_background (MateBGCrossfade *fade) { if (gdk_window_get_window_type (fade->priv->window) == GDK_WINDOW_ROOT) { @@ -391,6 +405,7 @@ draw_background (MateBGCrossfade *fade) gdk_window_get_width (fade->priv->window), gdk_window_get_height (fade->priv->window), False); + send_root_property_change_notification (fade); gdk_flush (); } else { gdk_window_invalidate_rect (fade->priv->window, NULL, FALSE); |