Make xwayland compile-time optional

This commit is contained in:
Versus Void 2017-10-06 21:50:25 +00:00
parent decd87043f
commit 9cab66f0f9
7 changed files with 57 additions and 28 deletions

View file

@ -34,14 +34,17 @@ struct roots_desktop {
struct wlr_compositor *compositor;
struct wlr_wl_shell *wl_shell;
struct wlr_xdg_shell_v6 *xdg_shell_v6;
struct wlr_xwayland *xwayland;
struct wlr_gamma_control_manager *gamma_control_manager;
struct wl_listener output_add;
struct wl_listener output_remove;
struct wl_listener xdg_shell_v6_surface;
struct wl_listener xwayland_surface;
struct wl_listener wl_shell_surface;
#ifdef HAS_XWAYLAND
struct wlr_xwayland *xwayland;
struct wl_listener xwayland_surface;
#endif
};
struct roots_server;

View file

@ -5,7 +5,9 @@
#include <wlr/backend/session.h>
#include <wlr/types/wlr_data_device_manager.h>
#include <wlr/render.h>
#ifdef HAS_XWAYLAND
#include <wlr/xwayland.h>
#endif
#include "rootston/config.h"
#include "rootston/desktop.h"
#include "rootston/input.h"

View file

@ -49,12 +49,16 @@ struct roots_view {
union {
struct wlr_wl_shell_surface *wl_shell_surface;
struct wlr_xdg_surface_v6 *xdg_surface_v6;
#ifdef HAS_XWAYLAND
struct wlr_xwayland_surface *xwayland_surface;
#endif
};
union {
struct roots_wl_shell_surface *roots_wl_shell_surface;
struct roots_xdg_surface_v6 *roots_xdg_surface_v6;
#ifdef HAS_XWAYLAND
struct roots_xwayland_surface *roots_xwayland_surface;
#endif
};
struct wlr_surface *wlr_surface;
// TODO: This would probably be better as a field that's updated on a