Commit 141ddd99 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Avoid unintended side-effect in gdk_window_get_events

Calling gdk_window_get_events() had the side-effect of letting
property change notification through to the application, which
was not intended. Now we keep StructureNotify and PropertyNotify
filtered out when they were before. Reported in bug 582003.
parent 4fc49fd8
......@@ -3538,18 +3538,20 @@ gdk_window_x11_get_events (GdkWindow *window)
XWindowAttributes attrs;
GdkEventMask event_mask;
GdkEventMask filtered;
return 0;
XGetWindowAttributes (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
GDK_WINDOW_XID (window),
event_mask = x_event_mask_to_gdk_event_mask (attrs.your_event_mask);
GDK_WINDOW_OBJECT (window)->event_mask = event_mask;
/* if property change was filtered out before, keep it filtered out */
GDK_WINDOW_OBJECT (window)->event_mask = event_mask & ((GDK_WINDOW_OBJECT (window)->event_mask & filtered) | ~filtered);
return event_mask;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment