mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 06:05:58 +01:00
Also set XDG_SESSION_TYPE
This commit is contained in:
parent
f0d03fb892
commit
e81d2086c0
1 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue