summaryrefslogtreecommitdiff
path: root/sway/desktop/xwayland.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r--sway/desktop/xwayland.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index 65c7e1ec..724c8a82 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -10,6 +10,8 @@
#include "sway/server.h"
#include "sway/view.h"
#include "sway/output.h"
+#include "sway/input/seat.h"
+#include "sway/input/input-manager.h"
#include "log.h"
static bool assert_xwayland(struct sway_view *view) {
@@ -171,4 +173,9 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) {
sway_view->swayc = cont;
arrange_windows(cont->parent, -1, -1);
+
+ for (int i = 0; i < server->input->seats->length; ++i) {
+ struct sway_seat *seat = server->input->seats->items[i];
+ sway_seat_set_focus(seat, cont);
+ }
}