From 16768a5ad4fdf58e1f7a9a1b949c055c846ea0e2 Mon Sep 17 00:00:00 2001 From: Cesare Tirabassi Date: Tue, 14 Jul 2009 18:46:15 +0200 Subject: [PATCH] Fix Property Change Events are passes also to OWN_WINDOW --- src/x11.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/x11.c b/src/x11.c index 95e1acd..44f1ea0 100644 --- a/src/x11.c +++ b/src/x11.c @@ -676,6 +676,16 @@ void get_x11_desktop_info(Display *display, Atom atom) get_x11_desktop_number(display, root, atom_number); get_x11_desktop_names(display, root, atom_names); get_x11_desktop_current_name(current_info->x11.desktop.all_names); + + //Set the PropertyChangeMask on the root window, if not set + XWindowAttributes window_attributes; + XGetWindowAttributes(display, root, &window_attributes); + if (!(window_attributes.your_event_mask & PropertyChangeMask)) { + XSetWindowAttributes attributes; + attributes.event_mask = window_attributes.your_event_mask | PropertyChangeMask; + XChangeWindowAttributes(display, root, CWEventMask, &attributes); + XGetWindowAttributes(display, root, &window_attributes); + } } else { if (atom == atom_current) { get_x11_desktop_current(display, root, atom_current); -- 1.7.9.5