summaryrefslogtreecommitdiff
path: root/src/lightdm.c
diff options
context:
space:
mode:
authorRichard Hansen <rhansen@rhansen.org>2023-04-17 04:33:07 -0400
committerRobert Ancell <robert.ancell@gmail.com>2023-04-28 13:34:51 +1200
commite520b32f9c4ab67b704874341f95925980349eab (patch)
tree5d02787d3a1e6c7871a443635c017906ff63f976 /src/lightdm.c
parentc84feb03279e7b1993e5307d4542e02bd5475629 (diff)
downloadlightdm-git-e520b32f9c4ab67b704874341f95925980349eab.tar.gz
Disable user switching if logind says it isn't supported
This should work now that seat_local_get_active_session returns the proper value for non-seat0 seats. Note: systemd-logind v245 and older erroneously report CanMultiSession=no on non-seat0 seats even when it is supported. This change will break those users. See <https://github.com/systemd/systemd/pull/15337>.
Diffstat (limited to 'src/lightdm.c')
-rw-r--r--src/lightdm.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lightdm.c b/src/lightdm.c
index 0ccfcd78..7fd77ed9 100644
--- a/src/lightdm.c
+++ b/src/lightdm.c
@@ -423,12 +423,10 @@ add_login1_seat (Login1Seat *login1_seat)
{
set_seat_properties (seat, seat_name);
- if (!login1_seat_get_can_multi_session (login1_seat))
- {
+ gboolean can_multi_session = login1_seat_get_can_multi_session (login1_seat);
+ if (!can_multi_session)
g_debug ("Seat %s has property CanMultiSession=no", seat_name);
- /* XXX: uncomment this line after bug #1371250 is closed.
- seat_set_property (seat, "allow-user-switching", "false"); */
- }
+ seat_set_supports_multi_session (seat, can_multi_session);
if (is_seat0)
seat_set_property (seat, "exit-on-failure", "true");