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/sway | |
parent | 817d37c95032946a2e508fcc33cfa5c7ed65cc0d (diff) |
Added meson option "enable_xwayland" (default: true) to enable/disable xwayland support
Diffstat (limited to 'include/sway')
-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 { pcre *instance; pcre *con_mark; uint32_t con_id; // internal ID + #ifdef HAVE_XWAYLAND uint32_t id; // X11 window ID + #endif pcre *window_role; uint32_t window_type; 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 @@ #include <wlr/render/wlr_renderer.h> // TODO WLR: make Xwayland optional #include "list.h" +#ifdef HAVE_XWAYLAND #include "sway/xwayland.h" +#endif struct sway_server { struct wl_display *wl_display; @@ -39,11 +41,11 @@ struct sway_server { struct wlr_xdg_shell *xdg_shell; struct wl_listener xdg_shell_surface; - + #ifdef HAVE_XWAYLAND struct sway_xwayland xwayland; struct wl_listener xwayland_surface; struct wl_listener xwayland_ready; - + #endif bool debug_txn_timings; list_t *transactions; @@ -65,6 +67,7 @@ void handle_idle_inhibitor_v1(struct wl_listener *listener, void *data); void handle_layer_shell_surface(struct wl_listener *listener, void *data); void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data); void handle_xdg_shell_surface(struct wl_listener *listener, void *data); +#ifdef HAVE_XWAYLAND void handle_xwayland_surface(struct wl_listener *listener, void *data); - +#endif #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 { struct wlr_output_layout *output_layout; struct wl_listener output_layout_change; - + #ifdef HAVE_XWAYLAND struct wl_list xwayland_unmanaged; // sway_xwayland_unmanaged::link + #endif struct wl_list drag_icons; // sway_drag_icon::link 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 @@ #include <wayland-server.h> #include <wlr/types/wlr_surface.h> #include <wlr/types/wlr_xdg_shell_v6.h> +#ifdef HAVE_XWAYLAND #include <wlr/xwayland.h> +#endif #include "sway/input/input-manager.h" #include "sway/input/seat.h" @@ -12,7 +14,9 @@ struct sway_container; enum sway_view_type { SWAY_VIEW_XDG_SHELL_V6, SWAY_VIEW_XDG_SHELL, + #ifdef HAVE_XWAYLAND SWAY_VIEW_XWAYLAND, + #endif }; enum sway_view_prop { @@ -22,7 +26,9 @@ enum sway_view_prop { VIEW_PROP_INSTANCE, VIEW_PROP_WINDOW_TYPE, VIEW_PROP_WINDOW_ROLE, + #ifdef HAVE_XWAYLAND VIEW_PROP_X11_WINDOW_ID, + #endif }; struct sway_view_impl { @@ -90,7 +96,9 @@ struct sway_view { union { struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6; struct wlr_xdg_surface *wlr_xdg_surface; + #ifdef HAVE_XWAYLAND struct wlr_xwayland_surface *wlr_xwayland_surface; + #endif struct wlr_wl_shell_surface *wlr_wl_shell_surface; }; @@ -133,7 +141,7 @@ struct sway_xdg_shell_view { struct wl_listener unmap; struct wl_listener destroy; }; - +#ifdef HAVE_XWAYLAND struct sway_xwayland_view { struct sway_view view; @@ -165,7 +173,7 @@ struct sway_xwayland_unmanaged { struct wl_listener unmap; struct wl_listener destroy; }; - +#endif struct sway_view_child; struct sway_view_child_impl { @@ -281,9 +289,10 @@ struct sway_view *view_from_wlr_xdg_surface( struct wlr_xdg_surface *xdg_surface); struct sway_view *view_from_wlr_xdg_surface_v6( struct wlr_xdg_surface_v6 *xdg_surface_v6); +#ifdef HAVE_XWAYLAND struct sway_view *view_from_wlr_xwayland_surface( struct wlr_xwayland_surface *xsurface); - +#endif struct sway_view *view_from_wlr_surface(struct wlr_surface *surface); /** 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 @@ +#ifdef HAVE_XWAYLAND #ifndef SWAY_XWAYLAND_H #define SWAY_XWAYLAND_H @@ -23,3 +24,4 @@ struct sway_xwayland { void handle_xwayland_ready(struct wl_listener *listener, void *data); #endif +#endif |