aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Simon Ser <contact@emersion.fr>2024-05-18 14:02:14 +0200
committerLibravatar Simon Zeni <simon@bl4ckb0ne.ca>2024-05-21 11:44:39 -0400
commit970415241497ceccfb013b6f8cb2395abee74e5c (patch)
tree4943b3c8e2794146f74e5f6871865c2231231f7a /include
parentsway/config/output.c: fix null deref on output config (diff)
downloadsway-970415241497ceccfb013b6f8cb2395abee74e5c.tar.gz
sway-970415241497ceccfb013b6f8cb2395abee74e5c.tar.zst
sway-970415241497ceccfb013b6f8cb2395abee74e5c.zip
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.
Diffstat (limited to 'include')
-rw-r--r--include/sway/criteria.h2
-rw-r--r--include/sway/server.h6
-rw-r--r--include/sway/tree/root.h4
-rw-r--r--include/sway/tree/view.h13
4 files changed, 13 insertions, 12 deletions
diff --git a/include/sway/criteria.h b/include/sway/criteria.h
index 8da345ea..758d70ed 100644
--- a/include/sway/criteria.h
+++ b/include/sway/criteria.h
@@ -36,7 +36,7 @@ struct criteria {
36 struct pattern *app_id; 36 struct pattern *app_id;
37 struct pattern *con_mark; 37 struct pattern *con_mark;
38 uint32_t con_id; // internal ID 38 uint32_t con_id; // internal ID
39#if HAVE_XWAYLAND 39#if WLR_HAS_XWAYLAND
40 struct pattern *class; 40 struct pattern *class;
41 uint32_t id; // X11 window ID 41 uint32_t id; // X11 window ID
42 struct pattern *instance; 42 struct pattern *instance;
diff --git a/include/sway/server.h b/include/sway/server.h
index c71851f6..90f187fd 100644
--- a/include/sway/server.h
+++ b/include/sway/server.h
@@ -5,7 +5,7 @@
5#include "config.h" 5#include "config.h"
6#include "list.h" 6#include "list.h"
7#include "sway/desktop/idle_inhibit_v1.h" 7#include "sway/desktop/idle_inhibit_v1.h"
8#if HAVE_XWAYLAND 8#if WLR_HAS_XWAYLAND
9#include "sway/xwayland.h" 9#include "sway/xwayland.h"
10#endif 10#endif
11 11
@@ -59,7 +59,7 @@ struct sway_server {
59 59
60 struct wlr_tablet_manager_v2 *tablet_v2; 60 struct wlr_tablet_manager_v2 *tablet_v2;
61 61
62#if HAVE_XWAYLAND 62#if WLR_HAS_XWAYLAND
63 struct sway_xwayland xwayland; 63 struct sway_xwayland xwayland;
64 struct wl_listener xwayland_surface; 64 struct wl_listener xwayland_surface;
65 struct wl_listener xwayland_ready; 65 struct wl_listener xwayland_ready;
@@ -165,7 +165,7 @@ void sway_session_lock_add_output(struct sway_session_lock *lock,
165bool sway_session_lock_has_surface(struct sway_session_lock *lock, 165bool sway_session_lock_has_surface(struct sway_session_lock *lock,
166 struct wlr_surface *surface); 166 struct wlr_surface *surface);
167void handle_xdg_shell_toplevel(struct wl_listener *listener, void *data); 167void handle_xdg_shell_toplevel(struct wl_listener *listener, void *data);
168#if HAVE_XWAYLAND 168#if WLR_HAS_XWAYLAND
169void handle_xwayland_surface(struct wl_listener *listener, void *data); 169void handle_xwayland_surface(struct wl_listener *listener, void *data);
170#endif 170#endif
171void handle_server_decoration(struct wl_listener *listener, void *data); 171void handle_server_decoration(struct wl_listener *listener, void *data);
diff --git a/include/sway/tree/root.h b/include/sway/tree/root.h
index 15df0f55..7de0abcd 100644
--- a/include/sway/tree/root.h
+++ b/include/sway/tree/root.h
@@ -2,12 +2,12 @@
2#define _SWAY_ROOT_H 2#define _SWAY_ROOT_H
3#include <wayland-server-core.h> 3#include <wayland-server-core.h>
4#include <wayland-util.h> 4#include <wayland-util.h>
5#include <wlr/config.h>
5#include <wlr/types/wlr_output_layout.h> 6#include <wlr/types/wlr_output_layout.h>
6#include <wlr/types/wlr_scene.h> 7#include <wlr/types/wlr_scene.h>
7#include <wlr/render/wlr_texture.h> 8#include <wlr/render/wlr_texture.h>
8#include "sway/tree/container.h" 9#include "sway/tree/container.h"
9#include "sway/tree/node.h" 10#include "sway/tree/node.h"
10#include "config.h"
11#include "list.h" 11#include "list.h"
12 12
13extern struct sway_root *root; 13extern struct sway_root *root;
@@ -47,7 +47,7 @@ struct sway_root {
47 struct wlr_scene_tree *shell_top; 47 struct wlr_scene_tree *shell_top;
48 struct wlr_scene_tree *fullscreen; 48 struct wlr_scene_tree *fullscreen;
49 struct wlr_scene_tree *fullscreen_global; 49 struct wlr_scene_tree *fullscreen_global;
50#if HAVE_XWAYLAND 50#if WLR_HAS_XWAYLAND
51 struct wlr_scene_tree *unmanaged; 51 struct wlr_scene_tree *unmanaged;
52#endif 52#endif
53 struct wlr_scene_tree *shell_overlay; 53 struct wlr_scene_tree *shell_overlay;
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index 7faacdcc..3ae8cf22 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -1,10 +1,11 @@
1#ifndef _SWAY_VIEW_H 1#ifndef _SWAY_VIEW_H
2#define _SWAY_VIEW_H 2#define _SWAY_VIEW_H
3#include <wayland-server-core.h> 3#include <wayland-server-core.h>
4#include <wlr/config.h>
4#include <wlr/types/wlr_compositor.h> 5#include <wlr/types/wlr_compositor.h>
5#include <wlr/types/wlr_scene.h> 6#include <wlr/types/wlr_scene.h>
6#include "sway/config.h" 7#include "sway/config.h"
7#if HAVE_XWAYLAND 8#if WLR_HAS_XWAYLAND
8#include <wlr/xwayland.h> 9#include <wlr/xwayland.h>
9#endif 10#endif
10#include "sway/input/input-manager.h" 11#include "sway/input/input-manager.h"
@@ -15,7 +16,7 @@ struct sway_xdg_decoration;
15 16
16enum sway_view_type { 17enum sway_view_type {
17 SWAY_VIEW_XDG_SHELL, 18 SWAY_VIEW_XDG_SHELL,
18#if HAVE_XWAYLAND 19#if WLR_HAS_XWAYLAND
19 SWAY_VIEW_XWAYLAND, 20 SWAY_VIEW_XWAYLAND,
20#endif 21#endif
21}; 22};
@@ -27,7 +28,7 @@ enum sway_view_prop {
27 VIEW_PROP_INSTANCE, 28 VIEW_PROP_INSTANCE,
28 VIEW_PROP_WINDOW_TYPE, 29 VIEW_PROP_WINDOW_TYPE,
29 VIEW_PROP_WINDOW_ROLE, 30 VIEW_PROP_WINDOW_ROLE,
30#if HAVE_XWAYLAND 31#if WLR_HAS_XWAYLAND
31 VIEW_PROP_X11_WINDOW_ID, 32 VIEW_PROP_X11_WINDOW_ID,
32 VIEW_PROP_X11_PARENT_ID, 33 VIEW_PROP_X11_PARENT_ID,
33#endif 34#endif
@@ -98,7 +99,7 @@ struct sway_view {
98 99
99 union { 100 union {
100 struct wlr_xdg_toplevel *wlr_xdg_toplevel; 101 struct wlr_xdg_toplevel *wlr_xdg_toplevel;
101#if HAVE_XWAYLAND 102#if WLR_HAS_XWAYLAND
102 struct wlr_xwayland_surface *wlr_xwayland_surface; 103 struct wlr_xwayland_surface *wlr_xwayland_surface;
103#endif 104#endif
104 }; 105 };
@@ -127,7 +128,7 @@ struct sway_xdg_shell_view {
127 struct wl_listener unmap; 128 struct wl_listener unmap;
128 struct wl_listener destroy; 129 struct wl_listener destroy;
129}; 130};
130#if HAVE_XWAYLAND 131#if WLR_HAS_XWAYLAND
131struct sway_xwayland_view { 132struct sway_xwayland_view {
132 struct sway_view view; 133 struct sway_view view;
133 134
@@ -293,7 +294,7 @@ void view_center_and_clip_surface(struct sway_view *view);
293 294
294struct sway_view *view_from_wlr_xdg_surface( 295struct sway_view *view_from_wlr_xdg_surface(
295 struct wlr_xdg_surface *xdg_surface); 296 struct wlr_xdg_surface *xdg_surface);
296#if HAVE_XWAYLAND 297#if WLR_HAS_XWAYLAND
297struct sway_view *view_from_wlr_xwayland_surface( 298struct sway_view *view_from_wlr_xwayland_surface(
298 struct wlr_xwayland_surface *xsurface); 299 struct wlr_xwayland_surface *xsurface);
299#endif 300#endif