[gnome-shell] userMenu: Use the session id to detect the current session



commit e411a4af21879457b22c668ac06671e5025b2d6c
Author: Adel Gadllah <adel gadllah gmail com>
Date:   Mon Feb 18 18:03:13 2013 +0100

    userMenu: Use the session id to detect the current session
    
    This allows us to detect startx sessions.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693896

 js/ui/userMenu.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js
index b12eee2..ff38859 100644
--- a/js/ui/userMenu.js
+++ b/js/ui/userMenu.js
@@ -48,6 +48,7 @@ const IMStatus = {
 
 
 const SystemdLoginSessionIface = <interface name='org.freedesktop.login1.Session'>
+    <property name="Id" type="s" access="read"/>
     <property name="Remote" type="b" access="read"/>
     <property name="Class" type="s" access="read"/>
     <property name="Type" type="s" access="read"/>
@@ -960,8 +961,7 @@ const UserMenuButton = new Lang.Class({
                         if (proxy.Class != "user")
                             continue;
 
-                        if (userName == GLib.get_user_name() &&
-                            !proxy.Remote && proxy.Type == "x11")
+                        if (proxy.Id == GLib.getenv('XDG_SESSION_ID'))
                             continue;
 
                         sessions.push({ user: this._userManager.get_user(userName),


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