diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-07-25 08:27:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-25 08:27:40 -0400 |
commit | fc718f629af231f8a0ae795b2f7529e213cab183 (patch) | |
tree | 7917aadbfb09d02d3d60045f0ba8d5028f0c4bb4 /include/sway/tree/view.h | |
parent | Merge pull request #2354 from RyanDwyer/fix-crash-on-tab-reap (diff) | |
parent | more style fixes, reorder config.h include (diff) | |
download | sway-fc718f629af231f8a0ae795b2f7529e213cab183.tar.gz sway-fc718f629af231f8a0ae795b2f7529e213cab183.tar.zst sway-fc718f629af231f8a0ae795b2f7529e213cab183.zip |
Merge pull request #2350 from ppascher/xwayland-optional
Added meson option to allow building sway without xwayland support
Diffstat (limited to 'include/sway/tree/view.h')
-rw-r--r-- | include/sway/tree/view.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 3bdfe252..1972447b 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h | |||
@@ -3,7 +3,10 @@ | |||
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 | #include "config.h" | ||
7 | #ifdef HAVE_XWAYLAND | ||
6 | #include <wlr/xwayland.h> | 8 | #include <wlr/xwayland.h> |
9 | #endif | ||
7 | #include "sway/input/input-manager.h" | 10 | #include "sway/input/input-manager.h" |
8 | #include "sway/input/seat.h" | 11 | #include "sway/input/seat.h" |
9 | 12 | ||
@@ -12,7 +15,9 @@ struct sway_container; | |||
12 | enum sway_view_type { | 15 | enum sway_view_type { |
13 | SWAY_VIEW_XDG_SHELL_V6, | 16 | SWAY_VIEW_XDG_SHELL_V6, |
14 | SWAY_VIEW_XDG_SHELL, | 17 | SWAY_VIEW_XDG_SHELL, |
18 | #ifdef HAVE_XWAYLAND | ||
15 | SWAY_VIEW_XWAYLAND, | 19 | SWAY_VIEW_XWAYLAND, |
20 | #endif | ||
16 | }; | 21 | }; |
17 | 22 | ||
18 | enum sway_view_prop { | 23 | enum sway_view_prop { |
@@ -22,7 +27,9 @@ enum sway_view_prop { | |||
22 | VIEW_PROP_INSTANCE, | 27 | VIEW_PROP_INSTANCE, |
23 | VIEW_PROP_WINDOW_TYPE, | 28 | VIEW_PROP_WINDOW_TYPE, |
24 | VIEW_PROP_WINDOW_ROLE, | 29 | VIEW_PROP_WINDOW_ROLE, |
30 | #ifdef HAVE_XWAYLAND | ||
25 | VIEW_PROP_X11_WINDOW_ID, | 31 | VIEW_PROP_X11_WINDOW_ID, |
32 | #endif | ||
26 | }; | 33 | }; |
27 | 34 | ||
28 | struct sway_view_impl { | 35 | struct sway_view_impl { |
@@ -90,7 +97,9 @@ struct sway_view { | |||
90 | union { | 97 | union { |
91 | struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; | 98 | struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; |
92 | struct wlr_xdg_surface *wlr_xdg_surface; | 99 | struct wlr_xdg_surface *wlr_xdg_surface; |
100 | #ifdef HAVE_XWAYLAND | ||
93 | struct wlr_xwayland_surface *wlr_xwayland_surface; | 101 | struct wlr_xwayland_surface *wlr_xwayland_surface; |
102 | #endif | ||
94 | struct wlr_wl_shell_surface *wlr_wl_shell_surface; | 103 | struct wlr_wl_shell_surface *wlr_wl_shell_surface; |
95 | }; | 104 | }; |
96 | 105 | ||
@@ -133,7 +142,7 @@ struct sway_xdg_shell_view { | |||
133 | struct wl_listener unmap; | 142 | struct wl_listener unmap; |
134 | struct wl_listener destroy; | 143 | struct wl_listener destroy; |
135 | }; | 144 | }; |
136 | 145 | #ifdef HAVE_XWAYLAND | |
137 | struct sway_xwayland_view { | 146 | struct sway_xwayland_view { |
138 | struct sway_view view; | 147 | struct sway_view view; |
139 | 148 | ||
@@ -165,7 +174,7 @@ struct sway_xwayland_unmanaged { | |||
165 | struct wl_listener unmap; | 174 | struct wl_listener unmap; |
166 | struct wl_listener destroy; | 175 | struct wl_listener destroy; |
167 | }; | 176 | }; |
168 | 177 | #endif | |
169 | struct sway_view_child; | 178 | struct sway_view_child; |
170 | 179 | ||
171 | struct sway_view_child_impl { | 180 | struct sway_view_child_impl { |
@@ -281,9 +290,10 @@ struct sway_view *view_from_wlr_xdg_surface( | |||
281 | struct wlr_xdg_surface *xdg_surface); | 290 | struct wlr_xdg_surface *xdg_surface); |
282 | struct sway_view *view_from_wlr_xdg_surface_v6( | 291 | struct sway_view *view_from_wlr_xdg_surface_v6( |
283 | struct wlr_xdg_surface_v6 *xdg_surface_v6); | 292 | struct wlr_xdg_surface_v6 *xdg_surface_v6); |
293 | #ifdef HAVE_XWAYLAND | ||
284 | struct sway_view *view_from_wlr_xwayland_surface( | 294 | struct sway_view *view_from_wlr_xwayland_surface( |
285 | struct wlr_xwayland_surface *xsurface); | 295 | struct wlr_xwayland_surface *xsurface); |
286 | 296 | #endif | |
287 | struct sway_view *view_from_wlr_surface(struct wlr_surface *surface); | 297 | struct sway_view *view_from_wlr_surface(struct wlr_surface *surface); |
288 | 298 | ||
289 | /** | 299 | /** |