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
This commit is contained in:
parent
3430012136
commit
e411a4af21
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user