aboutsummaryrefslogtreecommitdiff
path: root/sway/input/seat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index fc9e54b6..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,
@@ -181,6 +184,7 @@ static void handle_seat_container_destroy(struct wl_listener *listener,
bool set_focus =
focus != NULL &&
(focus == con || container_has_child(con, focus)) &&
+ con->parent && con->parent->children->length > 1 &&
con->type != C_WORKSPACE;
seat_container_destroy(seat_con);