Don't set XDG_SESSION_TYPE unless logind SetType succeeds
This commit is contained in:
parent
e81d2086c0
commit
7e990a2991
|
@ -257,12 +257,16 @@ static bool set_type(struct logind_session *session) {
|
||||||
sd_bus_error_free(&error);
|
sd_bus_error_free(&error);
|
||||||
sd_bus_message_unref(msg);
|
sd_bus_message_unref(msg);
|
||||||
|
|
||||||
|
if (ret < 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
ret = setenv("XDG_SESSION_TYPE", "wayland", 1);
|
ret = setenv("XDG_SESSION_TYPE", "wayland", 1);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
wlr_log(WLR_ERROR, "Failed to set XDG_SESSION_TYPE for session");
|
wlr_log(WLR_ERROR, "Failed to set XDG_SESSION_TYPE for session");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
return ret >= 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void release_control(struct logind_session *session) {
|
static void release_control(struct logind_session *session) {
|
||||||
|
|
Loading…
Reference in New Issue