]> Pileus Git - ~andy/gtk/commitdiff
Don't enforce property change events on the root window
authorMatthias Clasen <mclasen@redhat.com>
Sun, 10 May 2009 05:54:43 +0000 (01:54 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 11 May 2009 16:13:50 +0000 (12:13 -0400)
The code in gdk_x11_window_set_events is only meant to enforce
property change events on child windows. Pointed out in bug 531490.

gdk/x11/gdkwindow-x11.c

index 0a09f67acc620e5586ad2f857e841260e77d67a0..82966743c999e553521ccbc407028fbb2603cc39 100644 (file)
@@ -3557,13 +3557,14 @@ static void
 gdk_window_x11_set_events (GdkWindow    *window,
                            GdkEventMask  event_mask)
 {
-  long xevent_mask;
+  long xevent_mask = 0;
   int i;
   
   if (!GDK_WINDOW_DESTROYED (window))
     {
       GDK_WINDOW_OBJECT (window)->event_mask = event_mask;
-      xevent_mask = StructureNotifyMask | PropertyChangeMask;
+      if (GDK_WINDOW_XID (window) != GDK_WINDOW_XROOTWIN (window))
+        xevent_mask = StructureNotifyMask | PropertyChangeMask;
       for (i = 0; i < _gdk_nenvent_masks; i++)
        {
          if (event_mask & (1 << (i + 1)))