From 8ab3fc03aacf202f4d73b61f7c982e6ffca8312e Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Sun, 23 Aug 2020 20:12:51 +0200 Subject: logind: Remove session type check --- libseat/backend/logind.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'libseat/backend') 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; -- cgit v1.2.3