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 /sway/input | |
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 'sway/input')
-rw-r--r-- | sway/input/cursor.c | 3 | ||||
-rw-r--r-- | sway/input/seat.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 27597640..c873a20e 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -54,6 +54,7 @@ static struct sway_container *container_at_coords( | |||
54 | struct sway_seat *seat, double lx, double ly, | 54 | struct sway_seat *seat, double lx, double ly, |
55 | struct wlr_surface **surface, double *sx, double *sy) { | 55 | struct wlr_surface **surface, double *sx, double *sy) { |
56 | // check for unmanaged views first | 56 | // check for unmanaged views first |
57 | #ifdef HAVE_XWAYLAND | ||
57 | struct wl_list *unmanaged = &root_container.sway_root->xwayland_unmanaged; | 58 | struct wl_list *unmanaged = &root_container.sway_root->xwayland_unmanaged; |
58 | struct sway_xwayland_unmanaged *unmanaged_surface; | 59 | struct sway_xwayland_unmanaged *unmanaged_surface; |
59 | wl_list_for_each_reverse(unmanaged_surface, unmanaged, link) { | 60 | wl_list_for_each_reverse(unmanaged_surface, unmanaged, link) { |
@@ -69,7 +70,7 @@ static struct sway_container *container_at_coords( | |||
69 | return NULL; | 70 | return NULL; |
70 | } | 71 | } |
71 | } | 72 | } |
72 | 73 | #endif | |
73 | // find the output the cursor is on | 74 | // find the output the cursor is on |
74 | struct wlr_output_layout *output_layout = | 75 | struct wlr_output_layout *output_layout = |
75 | root_container.sway_root->output_layout; | 76 | root_container.sway_root->output_layout; |
diff --git a/sway/input/seat.c b/sway/input/seat.c index fc9e54b6..66d11eea 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -103,11 +103,13 @@ static void seat_send_focus(struct sway_container *con, | |||
103 | 103 | ||
104 | if (con->type == C_VIEW | 104 | if (con->type == C_VIEW |
105 | && seat_is_input_allowed(seat, con->sway_view->surface)) { | 105 | && seat_is_input_allowed(seat, con->sway_view->surface)) { |
106 | #ifdef HAVE_XWAYLAND | ||
106 | if (con->sway_view->type == SWAY_VIEW_XWAYLAND) { | 107 | if (con->sway_view->type == SWAY_VIEW_XWAYLAND) { |
107 | struct wlr_xwayland *xwayland = | 108 | struct wlr_xwayland *xwayland = |
108 | seat->input->server->xwayland.wlr_xwayland; | 109 | seat->input->server->xwayland.wlr_xwayland; |
109 | wlr_xwayland_set_seat(xwayland, seat->wlr_seat); | 110 | wlr_xwayland_set_seat(xwayland, seat->wlr_seat); |
110 | } | 111 | } |
112 | #endif | ||
111 | struct wlr_keyboard *keyboard = wlr_seat_get_keyboard(seat->wlr_seat); | 113 | struct wlr_keyboard *keyboard = wlr_seat_get_keyboard(seat->wlr_seat); |
112 | if (keyboard) { | 114 | if (keyboard) { |
113 | wlr_seat_keyboard_notify_enter(seat->wlr_seat, | 115 | wlr_seat_keyboard_notify_enter(seat->wlr_seat, |