mirror of
https://github.com/swaywm/sway.git
synced 2026-03-11 05:34:18 -04:00
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.
This commit is contained in:
parent
fd3b643d15
commit
9704152414
19 changed files with 56 additions and 59 deletions
|
|
@ -2,12 +2,12 @@
|
|||
#define _SWAY_ROOT_H
|
||||
#include <wayland-server-core.h>
|
||||
#include <wayland-util.h>
|
||||
#include <wlr/config.h>
|
||||
#include <wlr/types/wlr_output_layout.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include <wlr/render/wlr_texture.h>
|
||||
#include "sway/tree/container.h"
|
||||
#include "sway/tree/node.h"
|
||||
#include "config.h"
|
||||
#include "list.h"
|
||||
|
||||
extern struct sway_root *root;
|
||||
|
|
@ -47,7 +47,7 @@ struct sway_root {
|
|||
struct wlr_scene_tree *shell_top;
|
||||
struct wlr_scene_tree *fullscreen;
|
||||
struct wlr_scene_tree *fullscreen_global;
|
||||
#if HAVE_XWAYLAND
|
||||
#if WLR_HAS_XWAYLAND
|
||||
struct wlr_scene_tree *unmanaged;
|
||||
#endif
|
||||
struct wlr_scene_tree *shell_overlay;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
#ifndef _SWAY_VIEW_H
|
||||
#define _SWAY_VIEW_H
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/config.h>
|
||||
#include <wlr/types/wlr_compositor.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include "sway/config.h"
|
||||
#if HAVE_XWAYLAND
|
||||
#if WLR_HAS_XWAYLAND
|
||||
#include <wlr/xwayland.h>
|
||||
#endif
|
||||
#include "sway/input/input-manager.h"
|
||||
|
|
@ -15,7 +16,7 @@ struct sway_xdg_decoration;
|
|||
|
||||
enum sway_view_type {
|
||||
SWAY_VIEW_XDG_SHELL,
|
||||
#if HAVE_XWAYLAND
|
||||
#if WLR_HAS_XWAYLAND
|
||||
SWAY_VIEW_XWAYLAND,
|
||||
#endif
|
||||
};
|
||||
|
|
@ -27,7 +28,7 @@ enum sway_view_prop {
|
|||
VIEW_PROP_INSTANCE,
|
||||
VIEW_PROP_WINDOW_TYPE,
|
||||
VIEW_PROP_WINDOW_ROLE,
|
||||
#if HAVE_XWAYLAND
|
||||
#if WLR_HAS_XWAYLAND
|
||||
VIEW_PROP_X11_WINDOW_ID,
|
||||
VIEW_PROP_X11_PARENT_ID,
|
||||
#endif
|
||||
|
|
@ -98,7 +99,7 @@ struct sway_view {
|
|||
|
||||
union {
|
||||
struct wlr_xdg_toplevel *wlr_xdg_toplevel;
|
||||
#if HAVE_XWAYLAND
|
||||
#if WLR_HAS_XWAYLAND
|
||||
struct wlr_xwayland_surface *wlr_xwayland_surface;
|
||||
#endif
|
||||
};
|
||||
|
|
@ -127,7 +128,7 @@ struct sway_xdg_shell_view {
|
|||
struct wl_listener unmap;
|
||||
struct wl_listener destroy;
|
||||
};
|
||||
#if HAVE_XWAYLAND
|
||||
#if WLR_HAS_XWAYLAND
|
||||
struct sway_xwayland_view {
|
||||
struct sway_view view;
|
||||
|
||||
|
|
@ -293,7 +294,7 @@ void view_center_and_clip_surface(struct sway_view *view);
|
|||
|
||||
struct sway_view *view_from_wlr_xdg_surface(
|
||||
struct wlr_xdg_surface *xdg_surface);
|
||||
#if HAVE_XWAYLAND
|
||||
#if WLR_HAS_XWAYLAND
|
||||
struct sway_view *view_from_wlr_xwayland_surface(
|
||||
struct wlr_xwayland_surface *xsurface);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue