diff options
author | Drew DeVault <[email protected]> | 2018-02-25 12:55:19 -0500 |
---|---|---|
committer | Drew DeVault <[email protected]> | 2018-02-25 12:55:19 -0500 |
commit | 61c1c3e7afd431de08e037205c4849b5f485ff4f (patch) | |
tree | 622ebfb034c529b84103defbb669f1a96e189dee /sway/desktop/wl_shell.c | |
parent | 669f91b991b7bcc4108916f208cd4bbe14169460 (diff) |
Use focus for new windows xwayland/wl_shell
Diffstat (limited to 'sway/desktop/wl_shell.c')
-rw-r--r-- | sway/desktop/wl_shell.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sway/desktop/wl_shell.c b/sway/desktop/wl_shell.c index 0cde6583..0356aa81 100644 --- a/sway/desktop/wl_shell.c +++ b/sway/desktop/wl_shell.c @@ -131,14 +131,11 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) { sway_surface->destroy.notify = handle_destroy; wl_signal_add(&shell_surface->events.destroy, &sway_surface->destroy); - // TODO: actual focus semantics - 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); - sway_input_manager_set_focus(input_manager, cont); } |