diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-12-10 15:13:27 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-12-10 15:13:27 -0500 |
commit | 5e9ee32d63d7a02e65f05ee00295ef41e115b2eb (patch) | |
tree | 2497fcd2069f5cd9b89995a3cd5400c98c8b3e2b /sway/desktop/xdg_shell_v6.c | |
parent | 609f63934ab3eb925741450aa7f78db1c11bdd37 (diff) |
set focus on new window
Diffstat (limited to 'sway/desktop/xdg_shell_v6.c')
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index 2435c256..8ad6a5ec 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c @@ -7,6 +7,8 @@ #include "sway/layout.h" #include "sway/server.h" #include "sway/view.h" +#include "sway/input/seat.h" +#include "sway/input/input-manager.h" #include "log.h" static bool assert_xdg(struct sway_view *view) { @@ -132,4 +134,9 @@ void handle_xdg_shell_v6_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); + } } |