diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/arctica-greeter.vala | 12 | ||||
-rw-r--r-- | src/settings.vala | 1 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala index 0aee212..6dd5f43 100644 --- a/src/arctica-greeter.vala +++ b/src/arctica-greeter.vala @@ -246,7 +246,10 @@ public class ArcticaGreeter : Object public string? get_default_session () { var sessions = new List<string> (); - sessions.append ("lightdm-xsession"); + var hide_default_xsession = AGSettings.get_boolean (AGSettings.KEY_HIDE_DEFAULT_XSESSION); + if (!hide_default_xsession) { + sessions.append ("lightdm-xsession"); + } var preferred_sessions = AGSettings.get_strv (AGSettings.KEY_PREFERRED_SESSIONS); @@ -318,7 +321,12 @@ public class ArcticaGreeter : Object var xsessions_path = Path.build_filename ("/usr/share/xsessions/", session.concat(".desktop"), null); var wsessions_path = Path.build_filename ("/usr/share/wayland-sessions/", session.concat(".desktop"), null); - if (AGSettings.get_boolean (AGSettings.KEY_HIDE_WAYLAND_SESSIONS) & + if ((session == "lightdm-xsession") && + AGSettings.get_boolean (AGSettings.KEY_HIDE_DEFAULT_XSESSION)) { + debug ("default Xsession hidden: '%s'", session); + session = null; + } + else if (AGSettings.get_boolean (AGSettings.KEY_HIDE_WAYLAND_SESSIONS) & FileUtils.test (wsessions_path, FileTest.EXISTS)) { debug ("Wayland session hidden: '%s'", session); session = null; diff --git a/src/settings.vala b/src/settings.vala index 7c4bd84..68ce674 100644 --- a/src/settings.vala +++ b/src/settings.vala @@ -71,6 +71,7 @@ public class AGSettings : Object public const string KEY_FLATBUTTON_BORDERCOLOR = "flatbutton-bordercolor"; public const string KEY_ENABLE_HIDPI = "enable-hidpi"; public const string KEY_MENUBAR_ALPHA = "menubar-alpha"; + public const string KEY_HIDE_DEFAULT_XSESSION = "hide-default-xsession"; public const string KEY_HIDE_X11_SESSIONS = "hide-x11-sessions"; public const string KEY_HIDE_WAYLAND_SESSIONS = "hide-wayland-sessions"; public const string KEY_INCLUDEONLY_SESSIONS = "includeonly-sessions"; |