Also set XDG_SESSION_TYPE

This commit is contained in:
Ryan Walklin 2020-06-25 23:43:28 +12:00 committed by Simon Ser
parent f0d03fb892
commit e81d2086c0

View file

@ -250,12 +250,18 @@ static bool set_type(struct logind_session *session) {
session->path, "org.freedesktop.login1.Session", "SetType", session->path, "org.freedesktop.login1.Session", "SetType",
&error, &msg, "s", "wayland"); &error, &msg, "s", "wayland");
if (ret < 0) { if (ret < 0) {
wlr_log(WLR_ERROR, "Failed to set session type for session: %s", wlr_log(WLR_ERROR, "Failed to set logind session type for session: %s",
error.message); error.message);
} }
sd_bus_error_free(&error); sd_bus_error_free(&error);
sd_bus_message_unref(msg); sd_bus_message_unref(msg);
ret = setenv("XDG_SESSION_TYPE", "wayland", 1);
if (ret < 0) {
wlr_log(WLR_ERROR, "Failed to set XDG_SESSION_TYPE for session");
}
return ret >= 0; return ret >= 0;
} }