aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Podogov <ginkage@yandex.ru>2023-02-24 21:01:54 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-02-24 21:02:01 +0100
commitf71706058d30680542c28ca03d4be6a35b03124b (patch)
tree820eae5f42fe21f45358dc7b11451b90edd37d23
parent25329ea1dde73802add7bb312e5766b09223b995 (diff)
downloadarctica-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.
-rw-r--r--.patches-to-be-ported-from-slick-greeter/0062-Allow-wayland-sessions-to-pass-validation.patch43
-rw-r--r--src/arctica-greeter.vala10
2 files changed, 9 insertions, 44 deletions
diff --git a/.patches-to-be-ported-from-slick-greeter/0062-Allow-wayland-sessions-to-pass-validation.patch b/.patches-to-be-ported-from-slick-greeter/0062-Allow-wayland-sessions-to-pass-validation.patch
deleted file mode 100644
index e3c4889..0000000
--- a/.patches-to-be-ported-from-slick-greeter/0062-Allow-wayland-sessions-to-pass-validation.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From e6a649d20b926e9b82ea21af384c997636a90c9e Mon Sep 17 00:00:00 2001
-From: Ivan Podogov <ginkage@yandex.ru>
-Date: Wed, 28 Dec 2022 12:35:51 +0000
-Subject: [PATCH 62/81] Allow wayland sessions to pass validation
-
-This makes slick-greeter properly remember the last wayland session instead of defaulting to an xsession.
-
-Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
----
- src/slick-greeter.vala | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/src/slick-greeter.vala b/src/slick-greeter.vala
-index d1b9815..44661b5 100644
---- a/src/slick-greeter.vala
-+++ b/src/slick-greeter.vala
-@@ -204,6 +204,13 @@ public class SlickGreeter
- }
- }
-
-+ 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;
- }
-@@ -214,7 +221,8 @@ public class SlickGreeter
- otherwise, return the default session. */
- 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;
- }
---
-2.30.2
-
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;
}