mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
xwayland: use internal_config
Avoids the need to have a separate config.h, and removes C compiler arguments.
This commit is contained in:
parent
6c897756b6
commit
4da9b32a15
4 changed files with 28 additions and 37 deletions
|
@ -13,8 +13,6 @@ if not features.get('x11-backend')
|
||||||
endif
|
endif
|
||||||
if not features.get('xwayland')
|
if not features.get('xwayland')
|
||||||
exclude_files += 'xwayland.h'
|
exclude_files += 'xwayland.h'
|
||||||
else
|
|
||||||
subdir('xwayland')
|
|
||||||
endif
|
endif
|
||||||
if not features.get('gles2-renderer')
|
if not features.get('gles2-renderer')
|
||||||
exclude_files += ['render/egl.h', 'render/gles2.h']
|
exclude_files += ['render/egl.h', 'render/gles2.h']
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
xwayland_feature_names = [
|
|
||||||
'listenfd',
|
|
||||||
'no_touch_pointer_emulation',
|
|
||||||
'force_xrandr_emulation',
|
|
||||||
'terminate_delay',
|
|
||||||
]
|
|
||||||
|
|
||||||
xwayland_features = {}
|
|
||||||
if xwayland.found()
|
|
||||||
xwayland_path = xwayland.get_variable('xwayland')
|
|
||||||
foreach name : xwayland_feature_names
|
|
||||||
have = xwayland.get_variable('have_' + name, default_value: 'false') == 'true'
|
|
||||||
xwayland_features += { name: have }
|
|
||||||
endforeach
|
|
||||||
else
|
|
||||||
xwayland_path = xwayland_prog.full_path()
|
|
||||||
foreach name : xwayland_feature_names
|
|
||||||
xwayland_features += { name: false }
|
|
||||||
endforeach
|
|
||||||
endif
|
|
||||||
|
|
||||||
xwayland_config_data = configuration_data()
|
|
||||||
xwayland_config_data.set_quoted('XWAYLAND_PATH', xwayland_path)
|
|
||||||
foreach name, have : xwayland_features
|
|
||||||
xwayland_config_data.set10('HAVE_XWAYLAND_' + name.to_upper(), have)
|
|
||||||
endforeach
|
|
||||||
configure_file(
|
|
||||||
output: 'config.h',
|
|
||||||
configuration: xwayland_config_data,
|
|
||||||
)
|
|
|
@ -62,6 +62,32 @@ foreach lib, desc : xwayland_optional
|
||||||
xwayland_libs += dep
|
xwayland_libs += dep
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
xwayland_feature_names = [
|
||||||
|
'listenfd',
|
||||||
|
'no_touch_pointer_emulation',
|
||||||
|
'force_xrandr_emulation',
|
||||||
|
'terminate_delay',
|
||||||
|
]
|
||||||
|
|
||||||
|
xwayland_features = {}
|
||||||
|
if xwayland.found()
|
||||||
|
xwayland_path = xwayland.get_variable('xwayland')
|
||||||
|
foreach name : xwayland_feature_names
|
||||||
|
have = xwayland.get_variable('have_' + name, default_value: 'false') == 'true'
|
||||||
|
xwayland_features += { name: have }
|
||||||
|
endforeach
|
||||||
|
else
|
||||||
|
xwayland_path = xwayland_prog.full_path()
|
||||||
|
foreach name : xwayland_feature_names
|
||||||
|
xwayland_features += { name: false }
|
||||||
|
endforeach
|
||||||
|
endif
|
||||||
|
|
||||||
|
internal_config.set_quoted('XWAYLAND_PATH', xwayland_path)
|
||||||
|
foreach name, have : xwayland_features
|
||||||
|
internal_config.set10('HAVE_XWAYLAND_' + name.to_upper(), have)
|
||||||
|
endforeach
|
||||||
|
|
||||||
wlr_files += files(
|
wlr_files += files(
|
||||||
'selection/dnd.c',
|
'selection/dnd.c',
|
||||||
'selection/incoming.c',
|
'selection/incoming.c',
|
||||||
|
@ -77,7 +103,4 @@ wlr_deps += xwayland_libs
|
||||||
features += { 'xwayland': true }
|
features += { 'xwayland': true }
|
||||||
|
|
||||||
have = cc.has_function('xcb_xfixes_set_client_disconnect_mode', dependencies: xwayland_libs)
|
have = cc.has_function('xcb_xfixes_set_client_disconnect_mode', dependencies: xwayland_libs)
|
||||||
add_project_arguments(
|
internal_config.set10('HAS_XCB_XFIXES_SET_CLIENT_DISCONNECT_MODE', have)
|
||||||
'-DHAS_XCB_XFIXES_SET_CLIENT_DISCONNECT_MODE=@0@'.format(have.to_int()),
|
|
||||||
language: 'c',
|
|
||||||
)
|
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
#include <wayland-server-core.h>
|
#include <wayland-server-core.h>
|
||||||
#include <wlr/util/log.h>
|
#include <wlr/util/log.h>
|
||||||
#include <wlr/xwayland.h>
|
#include <wlr/xwayland.h>
|
||||||
|
#include "config.h"
|
||||||
#include "sockets.h"
|
#include "sockets.h"
|
||||||
#include "xwayland/config.h"
|
|
||||||
|
|
||||||
static void safe_close(int fd) {
|
static void safe_close(int fd) {
|
||||||
if (fd >= 0) {
|
if (fd >= 0) {
|
||||||
|
|
Loading…
Reference in a new issue