From ac9a113478b2408973bb8474573b0011ccbe9162 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Thu, 13 Oct 2016 21:48:58 +0200 Subject: [PATCH] MetaIdleMonitorNative: initialize last event timestamp If this isn't initialized and an idle watch gets instanced before meta_idle_monitor_native_reset_idletime() gets called, that idle watch would get triggered as soon as we hit the main loop. This was causing gnome-session to go into idle mode at session start thus making gnome-shell lock the screen. In the past this bug was being masked by either logind emiting session active signals or a stray input event making it through at startup. https://bugzilla.gnome.org/show_bug.cgi?id=772839 --- src/backends/native/meta-idle-monitor-native.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backends/native/meta-idle-monitor-native.c b/src/backends/native/meta-idle-monitor-native.c index da1ad06d1..5730ae0d2 100644 --- a/src/backends/native/meta-idle-monitor-native.c +++ b/src/backends/native/meta-idle-monitor-native.c @@ -162,6 +162,7 @@ meta_idle_monitor_native_init (MetaIdleMonitorNative *monitor_native) MetaIdleMonitor *monitor = META_IDLE_MONITOR (monitor_native); monitor->watches = g_hash_table_new_full (NULL, NULL, NULL, free_watch); + monitor_native->last_event_time = g_get_monotonic_time (); } void