[gnome-shell] ScreenShield: set LockedHint property from systemd



commit ddea54a5398c123a4711243e55811c8ba26f8b85
Author: Victor Toso <victortoso redhat com>
Date:   Thu May 12 09:25:49 2016 +0200

    ScreenShield: set LockedHint property from systemd
    
    Logind recently got support for a hint property in Session Object to
    inform if session is Locked or not. It is up to desktop environments
    to keep this property up to date.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=764773

 js/misc/loginManager.js |    3 +++
 js/ui/screenShield.js   |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/js/misc/loginManager.js b/js/misc/loginManager.js
index 6ed8262..7db94d4 100644
--- a/js/misc/loginManager.js
+++ b/js/misc/loginManager.js
@@ -40,6 +40,9 @@ const SystemdLoginSessionIface = '<node> \
 <signal name="Lock" /> \
 <signal name="Unlock" /> \
 <property name="Active" type="b" access="read" /> \
+<method name="SetLockedHint"> \
+    <arg type="b" direction="in"/> \
+</method> \
 </interface> \
 </node>';
 
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index d8d991c..18f5124 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -559,6 +559,9 @@ const ScreenShield = new Lang.Class({
         if (prevIsActive != this._isActive)
             this.emit('active-changed');
 
+        if (this._loginSession)
+            this._loginSession.SetLockedHintRemote(active);
+
         this._syncInhibitor();
     },
 


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