aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/wl_shell.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-10 15:13:27 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-10 15:13:27 -0500
commit5e9ee32d63d7a02e65f05ee00295ef41e115b2eb (patch)
tree2497fcd2069f5cd9b89995a3cd5400c98c8b3e2b /sway/desktop/wl_shell.c
parentbasic keyboard (diff)
downloadsway-5e9ee32d63d7a02e65f05ee00295ef41e115b2eb.tar.gz
sway-5e9ee32d63d7a02e65f05ee00295ef41e115b2eb.tar.zst
sway-5e9ee32d63d7a02e65f05ee00295ef41e115b2eb.zip
set focus on new window
Diffstat (limited to 'sway/desktop/wl_shell.c')
-rw-r--r--sway/desktop/wl_shell.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/desktop/wl_shell.c b/sway/desktop/wl_shell.c
index 3f5a358a..3d3b1c44 100644
--- a/sway/desktop/wl_shell.c
+++ b/sway/desktop/wl_shell.c
@@ -7,6 +7,8 @@
7#include "sway/layout.h" 7#include "sway/layout.h"
8#include "sway/server.h" 8#include "sway/server.h"
9#include "sway/view.h" 9#include "sway/view.h"
10#include "sway/input/seat.h"
11#include "sway/input/input-manager.h"
10#include "log.h" 12#include "log.h"
11 13
12static bool assert_wl_shell(struct sway_view *view) { 14static bool assert_wl_shell(struct sway_view *view) {
@@ -126,4 +128,9 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) {
126 sway_view->swayc = cont; 128 sway_view->swayc = cont;
127 129
128 arrange_windows(cont->parent, -1, -1); 130 arrange_windows(cont->parent, -1, -1);
131
132 for (int i = 0; i < server->input->seats->length; ++i) {
133 struct sway_seat *seat = server->input->seats->items[i];
134 sway_seat_set_focus(seat, cont);
135 }
129} 136}