Skip to content

Commit

Permalink
Don't set XDG_SESSION_TYPE unless logind SetType succeeds
Browse files Browse the repository at this point in the history
  • Loading branch information
tokyovigilante committed Jun 25, 2020
1 parent 00cbf7d commit b8e613b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions backend/session/logind.c
Expand Up @@ -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) {
Expand Down

0 comments on commit b8e613b

Please sign in to comment.