diff options
author | Ryan Walklin <ryan@testtoast.com> | 2020-09-02 21:29:12 +1200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-09-02 11:35:32 +0200 |
commit | 28cedb56237efdf388fed713ddb401a5d8d07434 (patch) | |
tree | c6dcb61c76745b52c4c64d8891917c553be1d682 /backend | |
parent | 971de474f0a423cc8f444c92d2e1a8334db8b55d (diff) |
Quieten failure to set login session type
(almost certainly due to systemd version <246)
Diffstat (limited to 'backend')
-rw-r--r-- | backend/session/logind.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/backend/session/logind.c b/backend/session/logind.c index a460cbe2..b9249ece 100644 --- a/backend/session/logind.c +++ b/backend/session/logind.c @@ -242,7 +242,7 @@ static bool take_control(struct logind_session *session) { return ret >= 0; } -static bool set_type(struct logind_session *session) { +static void set_type(struct logind_session *session) { int ret; sd_bus_message *msg = NULL; sd_bus_error error = SD_BUS_ERROR_NULL; @@ -251,7 +251,7 @@ static bool set_type(struct logind_session *session) { session->path, "org.freedesktop.login1.Session", "SetType", &error, &msg, "s", "wayland"); if (ret < 0) { - wlr_log(WLR_ERROR, "Failed to set logind session type for session: %s", + wlr_log(WLR_DEBUG, "Failed to set logind session type for session: %s", error.message); } @@ -259,15 +259,13 @@ static bool set_type(struct logind_session *session) { sd_bus_message_unref(msg); if (ret < 0) { - return false; + return; } ret = setenv("XDG_SESSION_TYPE", "wayland", 1); if (ret < 0) { wlr_log(WLR_ERROR, "Failed to set XDG_SESSION_TYPE for session"); - return false; } - return true; } static void release_control(struct logind_session *session) { @@ -850,10 +848,7 @@ static struct wlr_session *logind_session_create(struct wl_display *disp) { } } - if (!set_type(session)) { - // Not fatal - wlr_log(WLR_INFO, "Failed to set logind session type to wayland"); - } + set_type(session); wlr_log(WLR_INFO, "Successfully loaded logind session"); |