aboutsummaryrefslogtreecommitdiff
path: root/src/session-list.vala
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-04-03 17:07:57 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-04-03 17:07:57 +0200
commit2614224219792ae5baabb2e958ce768fdd4a7758 (patch)
tree20e6e0aaaacf4241e4eb85595a469db8d5419fad /src/session-list.vala
parentc9a2d903518d8d35e85437c5263e558992080cb1 (diff)
downloadarctica-greeter-2614224219792ae5baabb2e958ce768fdd4a7758.tar.gz
arctica-greeter-2614224219792ae5baabb2e958ce768fdd4a7758.tar.bz2
arctica-greeter-2614224219792ae5baabb2e958ce768fdd4a7758.zip
Add support for hiding X11 and/or Wayland sessions.
Diffstat (limited to 'src/session-list.vala')
-rw-r--r--src/session-list.vala7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/session-list.vala b/src/session-list.vala
index 878f20a..21e9eb6 100644
--- a/src/session-list.vala
+++ b/src/session-list.vala
@@ -55,8 +55,11 @@ public class SessionPrompt : PromptBox
{
foreach (var session in sessions_sorted_ci( LightDM.get_sessions() ) )
{
- debug ("Adding session %s (%s)", session.key, session.name);
- box.add_item (session.key, session.name, SessionList.get_badge (session.key));
+ /* Apply hide x11/wayland filter */
+ if (greeter.validate_session(session.key, false) != null) {
+ debug ("Adding session %s (%s)", session.key, session.name);
+ box.add_item (session.key, session.name, SessionList.get_badge (session.key));
+ }
}
}