diff options
author | Ryan Walklin <ryan@testtoast.com> | 2020-06-26 08:55:04 +1200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-08-07 19:15:25 +0200 |
commit | 7e990a29918968a6f418f3055fefa1d633b3016f (patch) | |
tree | 62acf9d5f685f09b14acebf05b7be3497802662c /backend | |
parent | e81d2086c055c697e2f3138529deaba112281f93 (diff) |
Don't set XDG_SESSION_TYPE unless logind SetType succeeds
Diffstat (limited to 'backend')
-rw-r--r-- | backend/session/logind.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/backend/session/logind.c b/backend/session/logind.c index 4f03e523..c5d0cb29 100644 --- a/backend/session/logind.c +++ b/backend/session/logind.c @@ -257,12 +257,16 @@ static bool set_type(struct logind_session *session) { sd_bus_error_free(&error); sd_bus_message_unref(msg); + if (ret < 0) { + return false; + } + 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 ret >= 0; + return true; } static void release_control(struct logind_session *session) { |