From 61c1c3e7afd431de08e037205c4849b5f485ff4f Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 25 Feb 2018 12:55:19 -0500 Subject: Use focus for new windows xwayland/wl_shell --- sway/desktop/xwayland.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sway/desktop/xwayland.c') diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 7603d3ca..7933f7b2 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c @@ -233,10 +233,9 @@ void handle_xwayland_surface(struct wl_listener *listener, void *data) { return; } - swayc_t *parent = root_container.children->items[0]; - parent = parent->children->items[0]; // workspace - - swayc_t *cont = new_view(parent, sway_view); + struct sway_seat *seat = input_manager_current_seat(input_manager); + swayc_t *focus = sway_seat_get_focus_inactive(seat, &root_container); + swayc_t *cont = new_view(focus, sway_view); sway_view->swayc = cont; arrange_windows(cont->parent, -1, -1); -- cgit v1.2.3-54-g00ecf