diff options
author | Ivan Podogov <ginkage@yandex.ru> | 2023-02-24 21:01:54 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-02-24 21:02:01 +0100 |
commit | f71706058d30680542c28ca03d4be6a35b03124b (patch) | |
tree | 820eae5f42fe21f45358dc7b11451b90edd37d23 /src/arctica-greeter.vala | |
parent | 25329ea1dde73802add7bb312e5766b09223b995 (diff) | |
download | arctica-greeter-f71706058d30680542c28ca03d4be6a35b03124b.tar.gz arctica-greeter-f71706058d30680542c28ca03d4be6a35b03124b.tar.bz2 arctica-greeter-f71706058d30680542c28ca03d4be6a35b03124b.zip |
Allow wayland sessions to pass validation.
This makes slick-greeter properly remember the last wayland session instead of defaulting to an xsession.
Diffstat (limited to 'src/arctica-greeter.vala')
-rw-r--r-- | src/arctica-greeter.vala | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala index 077f07d..08a8b8e 100644 --- a/src/arctica-greeter.vala +++ b/src/arctica-greeter.vala @@ -224,6 +224,13 @@ public class ArcticaGreeter : Object } } + foreach (string session in sessions) { + var path = Path.build_filename ("/usr/share/wayland-sessions/", session.concat(".desktop"), null); + if (FileUtils.test (path, FileTest.EXISTS)) { + return session; + } + } + warning ("Could not find a default session."); return null; } @@ -235,7 +242,8 @@ public class ArcticaGreeter : Object */ if (session != null) { var path = Path.build_filename ("/usr/share/xsessions/", session.concat(".desktop"), null); - if (!FileUtils.test (path, FileTest.EXISTS) ) { + var waypath = Path.build_filename ("/usr/share/wayland-sessions/", session.concat(".desktop"), null); + if (!FileUtils.test (path, FileTest.EXISTS) & !FileUtils.test (waypath, FileTest.EXISTS)) { debug ("Invalid session: '%s'", session); session = null; } |