aboutsummaryrefslogtreecommitdiff
path: root/sway/input
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-07-25 08:27:40 -0400
committerGitHub <noreply@github.com>2018-07-25 08:27:40 -0400
commitfc718f629af231f8a0ae795b2f7529e213cab183 (patch)
tree7917aadbfb09d02d3d60045f0ba8d5028f0c4bb4 /sway/input
parentfd1e2c172c12b5c5a3adac8e6de4009697bd7567 (diff)
parent384c55c0b465d6b9a9c4cb88d8752435ac5cf708 (diff)
downloadsway-fc718f629af231f8a0ae795b2f7529e213cab183.tar.xz
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.c4
-rw-r--r--sway/input/seat.c3
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 @@
#include <wlr/types/wlr_idle.h>
#include "list.h"
#include "log.h"
+#include "config.h"
#include "sway/desktop.h"
#include "sway/desktop/transaction.h"
#include "sway/input/cursor.h"
@@ -54,6 +55,7 @@ static struct sway_container *container_at_coords(
struct sway_seat *seat, double lx, double ly,
struct wlr_surface **surface, double *sx, double *sy) {
// check for unmanaged views first
+#ifdef HAVE_XWAYLAND
struct wl_list *unmanaged = &root_container.sway_root->xwayland_unmanaged;
struct sway_xwayland_unmanaged *unmanaged_surface;
wl_list_for_each_reverse(unmanaged_surface, unmanaged, link) {
@@ -69,7 +71,7 @@ static struct sway_container *container_at_coords(
return NULL;
}
}
-
+#endif
// find the output the cursor is on
struct wlr_output_layout *output_layout =
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 @@
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_xcursor_manager.h>
#include "log.h"
+#include "config.h"
#include "sway/debug.h"
#include "sway/desktop.h"
#include "sway/input/cursor.h"
@@ -103,11 +104,13 @@ static void seat_send_focus(struct sway_container *con,
if (con->type == C_VIEW
&& seat_is_input_allowed(seat, con->sway_view->surface)) {
+#ifdef HAVE_XWAYLAND
if (con->sway_view->type == SWAY_VIEW_XWAYLAND) {
struct wlr_xwayland *xwayland =
seat->input->server->xwayland.wlr_xwayland;
wlr_xwayland_set_seat(xwayland, seat->wlr_seat);
}
+#endif
struct wlr_keyboard *keyboard = wlr_seat_get_keyboard(seat->wlr_seat);
if (keyboard) {
wlr_seat_keyboard_notify_enter(seat->wlr_seat,