diff options
author | Kenny Levinsen <kl@kl.wtf> | 2020-08-23 20:12:51 +0200 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2020-08-23 20:12:51 +0200 |
commit | 8ab3fc03aacf202f4d73b61f7c982e6ffca8312e (patch) | |
tree | e9ce8fd730b340f705dc070855c4ad50d1f03a06 /libseat/backend/logind.c | |
parent | 24c66d8c084ff068482e4bc68cacb32957369864 (diff) |
logind: Remove session type check
Diffstat (limited to 'libseat/backend/logind.c')
-rw-r--r-- | libseat/backend/logind.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/libseat/backend/logind.c b/libseat/backend/logind.c index cba928a..415553c 100644 --- a/libseat/backend/logind.c +++ b/libseat/backend/logind.c @@ -637,7 +637,6 @@ out: static bool get_display_session(char **session_id) { assert(session_id != NULL); char *xdg_session_id = getenv("XDG_SESSION_ID"); - char *type = NULL; char *state = NULL; if (xdg_session_id) { @@ -669,17 +668,6 @@ static bool get_display_session(char **session_id) { assert(*session_id != NULL); - // Check that the available session is graphical - ret = sd_session_get_type(*session_id, &type); - if (ret < 0) { - goto error; - } - - const char *graphical_session_types[] = {"wayland", "x11", "mir", NULL}; - if (!contains_str(type, graphical_session_types)) { - goto error; - } - // Check that the session is active ret = sd_session_get_state(*session_id, &state); if (ret < 0) { @@ -691,12 +679,10 @@ static bool get_display_session(char **session_id) { goto error; } - free(type); free(state); return true; error: - free(type); free(state); free(*session_id); *session_id = NULL; |