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 /sway/input | |
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 'sway/input')
-rw-r--r-- | sway/input/cursor.c | 4 | ||||
-rw-r--r-- | sway/input/seat.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index d94a707c..02bd2239 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <wlr/types/wlr_idle.h> | 11 | #include <wlr/types/wlr_idle.h> |
12 | #include "list.h" | 12 | #include "list.h" |
13 | #include "log.h" | 13 | #include "log.h" |
14 | #include "config.h" | ||
14 | #include "sway/desktop.h" | 15 | #include "sway/desktop.h" |
15 | #include "sway/desktop/transaction.h" | 16 | #include "sway/desktop/transaction.h" |
16 | #include "sway/input/cursor.h" | 17 | #include "sway/input/cursor.h" |
@@ -54,6 +55,7 @@ static struct sway_container *container_at_coords( | |||
54 | struct sway_seat *seat, double lx, double ly, | 55 | struct sway_seat *seat, double lx, double ly, |
55 | struct wlr_surface **surface, double *sx, double *sy) { | 56 | struct wlr_surface **surface, double *sx, double *sy) { |
56 | // check for unmanaged views first | 57 | // check for unmanaged views first |
58 | #ifdef HAVE_XWAYLAND | ||
57 | struct wl_list *unmanaged = &root_container.sway_root->xwayland_unmanaged; | 59 | struct wl_list *unmanaged = &root_container.sway_root->xwayland_unmanaged; |
58 | struct sway_xwayland_unmanaged *unmanaged_surface; | 60 | struct sway_xwayland_unmanaged *unmanaged_surface; |
59 | wl_list_for_each_reverse(unmanaged_surface, unmanaged, link) { | 61 | wl_list_for_each_reverse(unmanaged_surface, unmanaged, link) { |
@@ -69,7 +71,7 @@ static struct sway_container *container_at_coords( | |||
69 | return NULL; | 71 | return NULL; |
70 | } | 72 | } |
71 | } | 73 | } |
72 | 74 | #endif | |
73 | // find the output the cursor is on | 75 | // find the output the cursor is on |
74 | struct wlr_output_layout *output_layout = | 76 | struct wlr_output_layout *output_layout = |
75 | root_container.sway_root->output_layout; | 77 | root_container.sway_root->output_layout; |
diff --git a/sway/input/seat.c b/sway/input/seat.c index 8c634e5f..8698d69e 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <wlr/types/wlr_output_layout.h> | 12 | #include <wlr/types/wlr_output_layout.h> |
13 | #include <wlr/types/wlr_xcursor_manager.h> | 13 | #include <wlr/types/wlr_xcursor_manager.h> |
14 | #include "log.h" | 14 | #include "log.h" |
15 | #include "config.h" | ||
15 | #include "sway/debug.h" | 16 | #include "sway/debug.h" |
16 | #include "sway/desktop.h" | 17 | #include "sway/desktop.h" |
17 | #include "sway/input/cursor.h" | 18 | #include "sway/input/cursor.h" |
@@ -103,11 +104,13 @@ static void seat_send_focus(struct sway_container *con, | |||
103 | 104 | ||
104 | if (con->type == C_VIEW | 105 | if (con->type == C_VIEW |
105 | && seat_is_input_allowed(seat, con->sway_view->surface)) { | 106 | && seat_is_input_allowed(seat, con->sway_view->surface)) { |
107 | #ifdef HAVE_XWAYLAND | ||
106 | if (con->sway_view->type == SWAY_VIEW_XWAYLAND) { | 108 | if (con->sway_view->type == SWAY_VIEW_XWAYLAND) { |
107 | struct wlr_xwayland *xwayland = | 109 | struct wlr_xwayland *xwayland = |
108 | seat->input->server->xwayland.wlr_xwayland; | 110 | seat->input->server->xwayland.wlr_xwayland; |
109 | wlr_xwayland_set_seat(xwayland, seat->wlr_seat); | 111 | wlr_xwayland_set_seat(xwayland, seat->wlr_seat); |
110 | } | 112 | } |
113 | #endif | ||
111 | struct wlr_keyboard *keyboard = wlr_seat_get_keyboard(seat->wlr_seat); | 114 | struct wlr_keyboard *keyboard = wlr_seat_get_keyboard(seat->wlr_seat); |
112 | if (keyboard) { | 115 | if (keyboard) { |
113 | wlr_seat_keyboard_notify_enter(seat->wlr_seat, | 116 | wlr_seat_keyboard_notify_enter(seat->wlr_seat, |