blob: 8052f79472f399d132c7113ab60918a9bda5a6c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
diff --git a/extras/panel/scim_panel_gtk.cpp b/extras/panel/scim_panel_gtk.cpp
index 613613f..b53ef75 100644
--- a/extras/panel/scim_panel_gtk.cpp
+++ b/extras/panel/scim_panel_gtk.cpp
@@ -1072,11 +1072,13 @@ ui_initialize (void)
#ifdef GDK_WINDOWING_X11
// Add an event filter function to observe X root window's properties.
GdkWindow *root_window = gdk_get_default_root_window ();
+ GdkEventMask event_mask;
#if GDK_MULTIHEAD_SAFE
if (_current_screen)
root_window = gdk_screen_get_root_window (_current_screen);
#endif
- gdk_window_set_events (root_window, (GdkEventMask)GDK_PROPERTY_NOTIFY);
+ event_mask = (GdkEventMask) (gdk_window_get_events (root_window) | GDK_PROPERTY_NOTIFY);
+ gdk_window_set_events (root_window, event_mask);
gdk_window_add_filter (root_window, ui_event_filter, NULL);
#endif
@@ -1323,9 +1325,11 @@ ui_switch_screen (GdkScreen *screen)
#ifdef GDK_WINDOWING_X11
GdkWindow *root_window = gdk_get_default_root_window ();
+ GdkEventMask event_mask;
if (_current_screen)
root_window = gdk_screen_get_root_window (_current_screen);
- gdk_window_set_events (root_window, (GdkEventMask)GDK_PROPERTY_NOTIFY);
+ event_mask = (GdkEventMask) (gdk_window_get_events (root_window) | GDK_PROPERTY_NOTIFY);
+ gdk_window_set_events (root_window, event_mask);
gdk_window_add_filter (root_window, ui_event_filter, NULL);
#endif
|