[mutter] idle-monitor: avoid XSyncBadAlarm X error



commit ad1e23ce7d99def1d315f3e25a037f2eec6bc4d0
Author: Ryan Lortie <desrt desrt ca>
Date:   Fri Feb 14 10:10:20 2014 -0500

    idle-monitor: avoid XSyncBadAlarm X error
    
    If we fail to find the IDLETIME counter, then the alarm variable will be
    uninitialised.  Most code paths are careful to check this before
    submitting XSync calls, but there is one check missing.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=724364

 src/core/meta-idle-monitor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/core/meta-idle-monitor.c b/src/core/meta-idle-monitor.c
index 77d26f3..eda9289 100644
--- a/src/core/meta-idle-monitor.c
+++ b/src/core/meta-idle-monitor.c
@@ -499,7 +499,7 @@ make_watch (MetaIdleMonitor           *monitor,
       if (meta_idle_monitor_get_idletime (monitor) > (gint64)timeout_msec)
         watch->idle_source_id = g_idle_add (fire_watch_idle, watch);
     }
-  else
+  else if (monitor->user_active_alarm != None)
     {
       watch->xalarm = monitor->user_active_alarm;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]