[mutter/gnome-3-22] MetaIdleMonitorNative: initialize last event timestamp



commit ac9a113478b2408973bb8474573b0011ccbe9162
Author: Rui Matos <tiagomatos gmail com>
Date:   Thu Oct 13 21:48:58 2016 +0200

    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 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/native/meta-idle-monitor-native.c b/src/backends/native/meta-idle-monitor-native.c
index da1ad06..5730ae0 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


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