summaryrefslogtreecommitdiffstats
path: root/x11/gnome-screensaver/files/patch-src_gs-idle-monitor.c
blob: 678fa7a70112d4d2cac3762f6cccba716357fce8 (plain) (blame)
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
33
--- src/gs-idle-monitor.c.orig  2009-03-07 21:35:19.000000000 -0500
+++ src/gs-idle-monitor.c   2009-03-07 21:36:00.000000000 -0500
@@ -271,13 +271,6 @@ init_xsync (GSIdleMonitor *monitor)
                 return FALSE;
         }
 
-        /* select for sync events */
-        gdk_error_trap_push ();
-        XSelectInput (GDK_DISPLAY (), GDK_ROOT_WINDOW (), XSyncAlarmNotifyMask);
-        if (gdk_error_trap_pop ()) {
-                g_warning ("XSelectInput failed");
-        }
-
         gdk_window_add_filter (NULL, (GdkFilterFunc)xevent_filter, monitor);
 
         return TRUE;
@@ -438,13 +431,15 @@ _xsync_alarm_set (GSIdleMonitor      *mo
                 | XSyncCAValueType
                 | XSyncCATestType
                 | XSyncCAValue
-                | XSyncCADelta;
+                | XSyncCADelta
+       | XSyncCAEvents;
 
         XSyncIntToValue (&delta, 0);
         attr.trigger.counter = monitor->priv->counter;
         attr.trigger.value_type = XSyncAbsolute;
         attr.trigger.wait_value = watch->interval;
         attr.delta = delta;
+   attr.events = True;
 
         attr.trigger.test_type = XSyncPositiveTransition;
         if (watch->xalarm_positive != None) {