diff options
author | Jan Chren <dev.rindeal+github.com@gmail.com> | 2019-05-22 14:43:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-22 14:43:13 +0200 |
commit | e04e1ba197e579e4af4399281352818f9d5d2eb2 (patch) | |
tree | 72da88577d56ccef9c5a0cdf73dcddc2fb974181 /backend/session | |
parent | 461c4f58a610bec2fc64b2132bccaa149ba9cfa3 (diff) |
session/logind: specify seat exactly
"/org/freedesktop/login1/seat/self" path triggers seat-finding code path in logind,
which currently relies on getting the session based on caller's PID.
This behaviour is deprecated in logind as it doesn't work eg. with systemd user units,
which run outside of user session.
We check for "seat0" in logind_change_vt() already as introduced in 47985d2dc56a6af469ac9375e7548136765aff16,
so hard-coding it here is not a problem, otherwise sd_session_get_seat() could be used.
Diffstat (limited to 'backend/session')
-rw-r--r-- | backend/session/logind.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/session/logind.c b/backend/session/logind.c index 03db78f0..276e2c3f 100644 --- a/backend/session/logind.c +++ b/backend/session/logind.c @@ -136,7 +136,7 @@ static bool logind_change_vt(struct wlr_session *base, unsigned vt) { sd_bus_error error = SD_BUS_ERROR_NULL; ret = sd_bus_call_method(session->bus, "org.freedesktop.login1", - "/org/freedesktop/login1/seat/self", "org.freedesktop.login1.Seat", "SwitchTo", + "/org/freedesktop/login1/seat/seat0", "org.freedesktop.login1.Seat", "SwitchTo", &error, &msg, "u", (uint32_t)vt); if (ret < 0) { wlr_log(WLR_ERROR, "Failed to change to vt '%d'", vt); |