mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
backend/session: Make libseat mandatory
This commit is contained in:
parent
21e8a940b8
commit
95b657ba80
5 changed files with 8 additions and 23 deletions
|
@ -1,7 +1,14 @@
|
||||||
|
libseat = dependency('libseat',
|
||||||
|
version: '>=0.2.0',
|
||||||
|
fallback: ['seatd', 'libseat'],
|
||||||
|
default_options: ['server=disabled', 'man-pages=disabled'],
|
||||||
|
)
|
||||||
|
|
||||||
wlr_files += files(
|
wlr_files += files(
|
||||||
'direct-ipc.c',
|
'direct-ipc.c',
|
||||||
'noop.c',
|
'noop.c',
|
||||||
'session.c',
|
'session.c',
|
||||||
|
'libseat.c'
|
||||||
)
|
)
|
||||||
|
|
||||||
if host_machine.system().startswith('freebsd')
|
if host_machine.system().startswith('freebsd')
|
||||||
|
@ -10,16 +17,4 @@ else
|
||||||
wlr_files += files('direct.c')
|
wlr_files += files('direct.c')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# libseat
|
wlr_deps += 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
|
|
||||||
|
|
|
@ -25,9 +25,7 @@ extern const struct session_impl session_direct;
|
||||||
extern const struct session_impl session_noop;
|
extern const struct session_impl session_noop;
|
||||||
|
|
||||||
static const struct session_impl *const impls[] = {
|
static const struct session_impl *const impls[] = {
|
||||||
#if WLR_HAS_LIBSEAT
|
|
||||||
&session_libseat,
|
&session_libseat,
|
||||||
#endif
|
|
||||||
&session_direct,
|
&session_direct,
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
@ -112,11 +110,7 @@ struct wlr_session *wlr_session_create(struct wl_display *disp) {
|
||||||
const char *env_wlr_session = getenv("WLR_SESSION");
|
const char *env_wlr_session = getenv("WLR_SESSION");
|
||||||
if (env_wlr_session) {
|
if (env_wlr_session) {
|
||||||
if (strcmp(env_wlr_session, "libseat") == 0) {
|
if (strcmp(env_wlr_session, "libseat") == 0) {
|
||||||
#if WLR_HAS_LIBSEAT
|
|
||||||
session = session_libseat.create(disp);
|
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) {
|
} else if (strcmp(env_wlr_session, "direct") == 0) {
|
||||||
session = session_direct.create(disp);
|
session = session_direct.create(disp);
|
||||||
} else if (strcmp(env_wlr_session, "noop") == 0) {
|
} else if (strcmp(env_wlr_session, "noop") == 0) {
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#ifndef WLR_CONFIG_H
|
#ifndef WLR_CONFIG_H
|
||||||
#define WLR_CONFIG_H
|
#define WLR_CONFIG_H
|
||||||
|
|
||||||
#mesondefine WLR_HAS_LIBSEAT
|
|
||||||
|
|
||||||
#mesondefine WLR_HAS_X11_BACKEND
|
#mesondefine WLR_HAS_X11_BACKEND
|
||||||
|
|
||||||
#mesondefine WLR_HAS_XWAYLAND
|
#mesondefine WLR_HAS_XWAYLAND
|
||||||
|
|
|
@ -81,7 +81,6 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
features = {
|
features = {
|
||||||
'libseat': false,
|
|
||||||
'x11-backend': false,
|
'x11-backend': false,
|
||||||
'xwayland': false,
|
'xwayland': false,
|
||||||
}
|
}
|
||||||
|
|
|
@ -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('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('xwayland', type: 'feature', value: 'auto', yield: true, description: 'Enable support for X11 applications')
|
||||||
option('x11-backend', type: 'feature', value: 'auto', description: 'Enable X11 backend')
|
option('x11-backend', type: 'feature', value: 'auto', description: 'Enable X11 backend')
|
||||||
|
|
Loading…
Reference in a new issue