mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
xwayland: check executable exists on init
Instead of walking PATH like a previous proposal [1], this one checks that the Xwayland path specified in the pkg-config file exists. I think this is a reasonable compromise: - Users that don't have Xwayland installed system-wide won't get a bogus DISPLAY env variable set up. - Users that have WLR_XWAYLAND set won't be affected by this check. - Users that have Xwayland installed system-wide and a different Xwayland in their PATH still get their custom Xwayland. - Users that don't have Xwayland installed system-wide but have it somewhere else in PATH are left out. But this is pretty niche, and they can just set WLR_XWAYLAND. [1]: https://github.com/swaywm/wlroots/pull/2314
This commit is contained in:
parent
3504bb587d
commit
eec2e1d3b1
3 changed files with 20 additions and 0 deletions
|
|
@ -6,6 +6,8 @@ if not features.get('x11-backend')
|
|||
endif
|
||||
if not features.get('xwayland')
|
||||
exclude_files += 'xwayland.h'
|
||||
else
|
||||
subdir('xwayland')
|
||||
endif
|
||||
if not features.get('xdg-foreign')
|
||||
exclude_files += [
|
||||
|
|
|
|||
12
include/xwayland/meson.build
Normal file
12
include/xwayland/meson.build
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
if xwayland.found()
|
||||
xwayland_path = xwayland.get_pkgconfig_variable('xwayland')
|
||||
else
|
||||
xwayland_path = xwayland_prog.full_path()
|
||||
endif
|
||||
|
||||
xwayland_config_data = configuration_data()
|
||||
xwayland_config_data.set_quoted('XWAYLAND_PATH', xwayland_path)
|
||||
configure_file(
|
||||
output: 'config.h',
|
||||
configuration: xwayland_config_data,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue