diff options
author | Pascal Pascher <aur@clouddrop.de> | 2018-07-24 22:16:06 +0200 |
---|---|---|
committer | Pascal Pascher <aur@clouddrop.de> | 2018-07-24 22:16:06 +0200 |
commit | 24ad1c3983192b47345566fd876e26b45160d68e (patch) | |
tree | b617f8d15cb20897b1c016fb67fab80d7245c66a /include | |
parent | Merge pull request #2165 from swaywm/pid-workspaces (diff) | |
download | sway-24ad1c3983192b47345566fd876e26b45160d68e.tar.gz sway-24ad1c3983192b47345566fd876e26b45160d68e.tar.zst sway-24ad1c3983192b47345566fd876e26b45160d68e.zip |
Added meson option "enable_xwayland" (default: true) to enable/disable xwayland support
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/criteria.h | 2 | ||||
-rw-r--r-- | include/sway/server.h | 9 | ||||
-rw-r--r-- | include/sway/tree/layout.h | 3 | ||||
-rw-r--r-- | include/sway/tree/view.h | 15 | ||||
-rw-r--r-- | include/sway/xwayland.h | 2 |
5 files changed, 24 insertions, 7 deletions
diff --git a/include/sway/criteria.h b/include/sway/criteria.h index 6a8337c5..5b5c0f58 100644 --- a/include/sway/criteria.h +++ b/include/sway/criteria.h | |||
@@ -25,7 +25,9 @@ struct criteria { | |||
25 | pcre *instance; | 25 | pcre *instance; |
26 | pcre *con_mark; | 26 | pcre *con_mark; |
27 | uint32_t con_id; // internal ID | 27 | uint32_t con_id; // internal ID |
28 | #ifdef HAVE_XWAYLAND | ||
28 | uint32_t id; // X11 window ID | 29 | uint32_t id; // X11 window ID |
30 | #endif | ||
29 | pcre *window_role; | 31 | pcre *window_role; |
30 | uint32_t window_type; | 32 | uint32_t window_type; |
31 | bool floating; | 33 | bool floating; |
diff --git a/include/sway/server.h b/include/sway/server.h index 70bde6d4..fb22125f 100644 --- a/include/sway/server.h +++ b/include/sway/server.h | |||
@@ -12,7 +12,9 @@ | |||
12 | #include <wlr/render/wlr_renderer.h> | 12 | #include <wlr/render/wlr_renderer.h> |
13 | // TODO WLR: make Xwayland optional | 13 | // TODO WLR: make Xwayland optional |
14 | #include "list.h" | 14 | #include "list.h" |
15 | #ifdef HAVE_XWAYLAND | ||
15 | #include "sway/xwayland.h" | 16 | #include "sway/xwayland.h" |
17 | #endif | ||
16 | 18 | ||
17 | struct sway_server { | 19 | struct sway_server { |
18 | struct wl_display *wl_display; | 20 | struct wl_display *wl_display; |
@@ -39,11 +41,11 @@ struct sway_server { | |||
39 | 41 | ||
40 | struct wlr_xdg_shell *xdg_shell; | 42 | struct wlr_xdg_shell *xdg_shell; |
41 | struct wl_listener xdg_shell_surface; | 43 | struct wl_listener xdg_shell_surface; |
42 | 44 | #ifdef HAVE_XWAYLAND | |
43 | struct sway_xwayland xwayland; | 45 | struct sway_xwayland xwayland; |
44 | struct wl_listener xwayland_surface; | 46 | struct wl_listener xwayland_surface; |
45 | struct wl_listener xwayland_ready; | 47 | struct wl_listener xwayland_ready; |
46 | 48 | #endif | |
47 | bool debug_txn_timings; | 49 | bool debug_txn_timings; |
48 | 50 | ||
49 | list_t *transactions; | 51 | list_t *transactions; |
@@ -65,6 +67,7 @@ void handle_idle_inhibitor_v1(struct wl_listener *listener, void *data); | |||
65 | void handle_layer_shell_surface(struct wl_listener *listener, void *data); | 67 | void handle_layer_shell_surface(struct wl_listener *listener, void *data); |
66 | void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data); | 68 | void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data); |
67 | void handle_xdg_shell_surface(struct wl_listener *listener, void *data); | 69 | void handle_xdg_shell_surface(struct wl_listener *listener, void *data); |
70 | #ifdef HAVE_XWAYLAND | ||
68 | void handle_xwayland_surface(struct wl_listener *listener, void *data); | 71 | void handle_xwayland_surface(struct wl_listener *listener, void *data); |
69 | 72 | #endif | |
70 | #endif | 73 | #endif |
diff --git a/include/sway/tree/layout.h b/include/sway/tree/layout.h index 7d7da2d7..da74e205 100644 --- a/include/sway/tree/layout.h +++ b/include/sway/tree/layout.h | |||
@@ -27,8 +27,9 @@ struct sway_root { | |||
27 | struct wlr_output_layout *output_layout; | 27 | struct wlr_output_layout *output_layout; |
28 | 28 | ||
29 | struct wl_listener output_layout_change; | 29 | struct wl_listener output_layout_change; |
30 | 30 | #ifdef HAVE_XWAYLAND | |
31 | struct wl_list xwayland_unmanaged; // sway_xwayland_unmanaged::link | 31 | struct wl_list xwayland_unmanaged; // sway_xwayland_unmanaged::link |
32 | #endif | ||
32 | struct wl_list drag_icons; // sway_drag_icon::link | 33 | struct wl_list drag_icons; // sway_drag_icon::link |
33 | 34 | ||
34 | struct wlr_texture *debug_tree; | 35 | struct wlr_texture *debug_tree; |
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 3bdfe252..af12cf88 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h | |||
@@ -3,7 +3,9 @@ | |||
3 | #include <wayland-server.h> | 3 | #include <wayland-server.h> |
4 | #include <wlr/types/wlr_surface.h> | 4 | #include <wlr/types/wlr_surface.h> |
5 | #include <wlr/types/wlr_xdg_shell_v6.h> | 5 | #include <wlr/types/wlr_xdg_shell_v6.h> |
6 | #ifdef HAVE_XWAYLAND | ||
6 | #include <wlr/xwayland.h> | 7 | #include <wlr/xwayland.h> |
8 | #endif | ||
7 | #include "sway/input/input-manager.h" | 9 | #include "sway/input/input-manager.h" |
8 | #include "sway/input/seat.h" | 10 | #include "sway/input/seat.h" |
9 | 11 | ||
@@ -12,7 +14,9 @@ struct sway_container; | |||
12 | enum sway_view_type { | 14 | enum sway_view_type { |
13 | SWAY_VIEW_XDG_SHELL_V6, | 15 | SWAY_VIEW_XDG_SHELL_V6, |
14 | SWAY_VIEW_XDG_SHELL, | 16 | SWAY_VIEW_XDG_SHELL, |
17 | #ifdef HAVE_XWAYLAND | ||
15 | SWAY_VIEW_XWAYLAND, | 18 | SWAY_VIEW_XWAYLAND, |
19 | #endif | ||
16 | }; | 20 | }; |
17 | 21 | ||
18 | enum sway_view_prop { | 22 | enum sway_view_prop { |
@@ -22,7 +26,9 @@ enum sway_view_prop { | |||
22 | VIEW_PROP_INSTANCE, | 26 | VIEW_PROP_INSTANCE, |
23 | VIEW_PROP_WINDOW_TYPE, | 27 | VIEW_PROP_WINDOW_TYPE, |
24 | VIEW_PROP_WINDOW_ROLE, | 28 | VIEW_PROP_WINDOW_ROLE, |
29 | #ifdef HAVE_XWAYLAND | ||
25 | VIEW_PROP_X11_WINDOW_ID, | 30 | VIEW_PROP_X11_WINDOW_ID, |
31 | #endif | ||
26 | }; | 32 | }; |
27 | 33 | ||
28 | struct sway_view_impl { | 34 | struct sway_view_impl { |
@@ -90,7 +96,9 @@ struct sway_view { | |||
90 | union { | 96 | union { |
91 | struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; | 97 | struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; |
92 | struct wlr_xdg_surface *wlr_xdg_surface; | 98 | struct wlr_xdg_surface *wlr_xdg_surface; |
99 | #ifdef HAVE_XWAYLAND | ||
93 | struct wlr_xwayland_surface *wlr_xwayland_surface; | 100 | struct wlr_xwayland_surface *wlr_xwayland_surface; |
101 | #endif | ||
94 | struct wlr_wl_shell_surface *wlr_wl_shell_surface; | 102 | struct wlr_wl_shell_surface *wlr_wl_shell_surface; |
95 | }; | 103 | }; |
96 | 104 | ||
@@ -133,7 +141,7 @@ struct sway_xdg_shell_view { | |||
133 | struct wl_listener unmap; | 141 | struct wl_listener unmap; |
134 | struct wl_listener destroy; | 142 | struct wl_listener destroy; |
135 | }; | 143 | }; |
136 | 144 | #ifdef HAVE_XWAYLAND | |
137 | struct sway_xwayland_view { | 145 | struct sway_xwayland_view { |
138 | struct sway_view view; | 146 | struct sway_view view; |
139 | 147 | ||
@@ -165,7 +173,7 @@ struct sway_xwayland_unmanaged { | |||
165 | struct wl_listener unmap; | 173 | struct wl_listener unmap; |
166 | struct wl_listener destroy; | 174 | struct wl_listener destroy; |
167 | }; | 175 | }; |
168 | 176 | #endif | |
169 | struct sway_view_child; | 177 | struct sway_view_child; |
170 | 178 | ||
171 | struct sway_view_child_impl { | 179 | struct sway_view_child_impl { |
@@ -281,9 +289,10 @@ struct sway_view *view_from_wlr_xdg_surface( | |||
281 | struct wlr_xdg_surface *xdg_surface); | 289 | struct wlr_xdg_surface *xdg_surface); |
282 | struct sway_view *view_from_wlr_xdg_surface_v6( | 290 | struct sway_view *view_from_wlr_xdg_surface_v6( |
283 | struct wlr_xdg_surface_v6 *xdg_surface_v6); | 291 | struct wlr_xdg_surface_v6 *xdg_surface_v6); |
292 | #ifdef HAVE_XWAYLAND | ||
284 | struct sway_view *view_from_wlr_xwayland_surface( | 293 | struct sway_view *view_from_wlr_xwayland_surface( |
285 | struct wlr_xwayland_surface *xsurface); | 294 | struct wlr_xwayland_surface *xsurface); |
286 | 295 | #endif | |
287 | struct sway_view *view_from_wlr_surface(struct wlr_surface *surface); | 296 | struct sway_view *view_from_wlr_surface(struct wlr_surface *surface); |
288 | 297 | ||
289 | /** | 298 | /** |
diff --git a/include/sway/xwayland.h b/include/sway/xwayland.h index 78d1053b..e6572ae9 100644 --- a/include/sway/xwayland.h +++ b/include/sway/xwayland.h | |||
@@ -1,3 +1,4 @@ | |||
1 | #ifdef HAVE_XWAYLAND | ||
1 | #ifndef SWAY_XWAYLAND_H | 2 | #ifndef SWAY_XWAYLAND_H |
2 | #define SWAY_XWAYLAND_H | 3 | #define SWAY_XWAYLAND_H |
3 | 4 | ||
@@ -23,3 +24,4 @@ struct sway_xwayland { | |||
23 | void handle_xwayland_ready(struct wl_listener *listener, void *data); | 24 | void handle_xwayland_ready(struct wl_listener *listener, void *data); |
24 | 25 | ||
25 | #endif | 26 | #endif |
27 | #endif | ||