[gnome-desktop] gnome-bg: force property update when doing new crossfade frame
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop] gnome-bg: force property update when doing new crossfade frame
- Date: Wed, 16 Mar 2011 15:03:30 +0000 (UTC)
commit e36d931ca2aad168427e22d23f9013316854370e
Author: Ray Strode <rstrode redhat com>
Date: Mon Feb 7 13:56:41 2011 -0500
gnome-bg: force property update when doing new crossfade frame
gnome-shell needs to get notified about animation updates.
This commit frobs the property to wake mutter up.
https://bugzilla.gnome.org/show_bug.cgi?id=641526
libgnome-desktop/gnome-bg-crossfade.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/libgnome-desktop/gnome-bg-crossfade.c b/libgnome-desktop/gnome-bg-crossfade.c
index 02a120e..8a4778c 100644
--- a/libgnome-desktop/gnome-bg-crossfade.c
+++ b/libgnome-desktop/gnome-bg-crossfade.c
@@ -371,6 +371,20 @@ animations_are_disabled (GnomeBGCrossfade *fade)
}
static void
+send_root_property_change_notification (GnomeBGCrossfade *fade)
+{
+ long zero_length_pixmap;
+
+ /* 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,
+ (guchar *) &zero_length_pixmap, 0);
+}
+
+static void
draw_background (GnomeBGCrossfade *fade)
{
if (gdk_window_get_window_type (fade->priv->window) == GDK_WINDOW_ROOT) {
@@ -380,6 +394,9 @@ draw_background (GnomeBGCrossfade *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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]