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
This commit is contained in:
parent
52d411bd85
commit
ad1e23ce7d
@ -499,7 +499,7 @@ make_watch (MetaIdleMonitor *monitor,
|
|||||||
if (meta_idle_monitor_get_idletime (monitor) > (gint64)timeout_msec)
|
if (meta_idle_monitor_get_idletime (monitor) > (gint64)timeout_msec)
|
||||||
watch->idle_source_id = g_idle_add (fire_watch_idle, watch);
|
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;
|
watch->xalarm = monitor->user_active_alarm;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user