From 95b657ba80f6128eefd246fdd1373664f45b1541 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Sun, 11 Apr 2021 16:29:24 +0200 Subject: [PATCH] backend/session: Make libseat mandatory --- backend/session/meson.build | 21 ++++++++------------- backend/session/session.c | 6 ------ include/wlr/config.h.in | 2 -- meson.build | 1 - meson_options.txt | 1 - 5 files changed, 8 insertions(+), 23 deletions(-) diff --git a/backend/session/meson.build b/backend/session/meson.build index 016d0fbb..2724d44f 100644 --- a/backend/session/meson.build +++ b/backend/session/meson.build @@ -1,7 +1,14 @@ +libseat = dependency('libseat', + version: '>=0.2.0', + fallback: ['seatd', 'libseat'], + default_options: ['server=disabled', 'man-pages=disabled'], +) + wlr_files += files( 'direct-ipc.c', 'noop.c', 'session.c', + 'libseat.c' ) if host_machine.system().startswith('freebsd') @@ -10,16 +17,4 @@ else wlr_files += files('direct.c') endif -# libseat - -libseat = dependency('libseat', - required: get_option('libseat'), - version: '>=0.2.0', - fallback: ['seatd', 'libseat'], - default_options: ['server=disabled', 'man-pages=disabled'], -) -if libseat.found() - wlr_files += files('libseat.c') - wlr_deps += libseat - features += { 'libseat': true } -endif +wlr_deps += libseat diff --git a/backend/session/session.c b/backend/session/session.c index ed332c7c..b0c407aa 100644 --- a/backend/session/session.c +++ b/backend/session/session.c @@ -25,9 +25,7 @@ extern const struct session_impl session_direct; extern const struct session_impl session_noop; static const struct session_impl *const impls[] = { -#if WLR_HAS_LIBSEAT &session_libseat, -#endif &session_direct, NULL, }; @@ -112,11 +110,7 @@ struct wlr_session *wlr_session_create(struct wl_display *disp) { const char *env_wlr_session = getenv("WLR_SESSION"); if (env_wlr_session) { if (strcmp(env_wlr_session, "libseat") == 0) { -#if WLR_HAS_LIBSEAT session = session_libseat.create(disp); -#else - wlr_log(WLR_ERROR, "wlroots is not compiled with libseat support"); -#endif } else if (strcmp(env_wlr_session, "direct") == 0) { session = session_direct.create(disp); } else if (strcmp(env_wlr_session, "noop") == 0) { diff --git a/include/wlr/config.h.in b/include/wlr/config.h.in index bcea55a1..ea7bde1a 100644 --- a/include/wlr/config.h.in +++ b/include/wlr/config.h.in @@ -1,8 +1,6 @@ #ifndef WLR_CONFIG_H #define WLR_CONFIG_H -#mesondefine WLR_HAS_LIBSEAT - #mesondefine WLR_HAS_X11_BACKEND #mesondefine WLR_HAS_XWAYLAND diff --git a/meson.build b/meson.build index 84e1a521..5095e877 100644 --- a/meson.build +++ b/meson.build @@ -81,7 +81,6 @@ else endif features = { - 'libseat': false, 'x11-backend': false, 'xwayland': false, } diff --git a/meson_options.txt b/meson_options.txt index 033019cc..37812cf8 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,4 +1,3 @@ -option('libseat', type: 'feature', value: 'auto', description: 'Enable support for rootless session via libseat') option('xcb-errors', type: 'feature', value: 'auto', description: 'Use xcb-errors util library') option('xwayland', type: 'feature', value: 'auto', yield: true, description: 'Enable support for X11 applications') option('x11-backend', type: 'feature', value: 'auto', description: 'Enable X11 backend')