build: drop xwayland option

Instead of having a build-time option to enable/disable xwayland
support, just use the wlroots build config: enable xwayland in
Sway if it was enabled when building wlroots. I don't see any
use-case for disabling xwayland in Sway when enabled in wlroots:
Sway doesn't pull in any additional dependency (just pulls in
dependencies that wlroots already needs). We have a config command
to disable xwayland at runtime anyways.

This makes it so xwayland behaves the same way as other features
such as libinput backend and session support. This also reduces
the build matrix (less combinations of build options).

I think we originally introduced the xwayland option when we didn't
have a good way to figure out the wlroots build config from the
Sway build system.
This commit is contained in:
Simon Ser 2024-05-18 14:02:14 +02:00 committed by Simon Zeni
parent fd3b643d15
commit 9704152414
19 changed files with 56 additions and 59 deletions

View file

@ -5,7 +5,7 @@
#include "config.h"
#include "list.h"
#include "sway/desktop/idle_inhibit_v1.h"
#if HAVE_XWAYLAND
#if WLR_HAS_XWAYLAND
#include "sway/xwayland.h"
#endif
@ -59,7 +59,7 @@ struct sway_server {
struct wlr_tablet_manager_v2 *tablet_v2;
#if HAVE_XWAYLAND
#if WLR_HAS_XWAYLAND
struct sway_xwayland xwayland;
struct wl_listener xwayland_surface;
struct wl_listener xwayland_ready;
@ -165,7 +165,7 @@ void sway_session_lock_add_output(struct sway_session_lock *lock,
bool sway_session_lock_has_surface(struct sway_session_lock *lock,
struct wlr_surface *surface);
void handle_xdg_shell_toplevel(struct wl_listener *listener, void *data);
#if HAVE_XWAYLAND
#if WLR_HAS_XWAYLAND
void handle_xwayland_surface(struct wl_listener *listener, void *data);
#endif
void handle_server_decoration(struct wl_listener *listener, void *data);