aboutsummaryrefslogtreecommitdiff
path: root/libseat/backend/logind.c
diff options
context:
space:
mode:
Diffstat (limited to 'libseat/backend/logind.c')
-rw-r--r--libseat/backend/logind.c14
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;