aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-03-31 09:45:11 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-03-31 09:45:11 -0400
commit8aa195e3116d7dbc897da50d2795e4a638c0b184 (patch)
treecc0730b5a48e1e558e956132feac7ccadd8ef299 /sway/input/cursor.c
parentSet Xwayland seat on focus (diff)
downloadsway-8aa195e3116d7dbc897da50d2795e4a638c0b184.tar.gz
sway-8aa195e3116d7dbc897da50d2795e4a638c0b184.tar.zst
sway-8aa195e3116d7dbc897da50d2795e4a638c0b184.zip
Fix #1104
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 7390816f..6b8522bf 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -175,7 +175,13 @@ static void handle_cursor_button(struct wl_listener *listener, void *data) {
175 double sx, sy; 175 double sx, sy;
176 struct sway_container *cont = 176 struct sway_container *cont =
177 container_at_cursor(cursor, &surface, &sx, &sy); 177 container_at_cursor(cursor, &surface, &sx, &sy);
178 sway_seat_set_focus(cursor->seat, cont); 178 // TODO: Actually test if the surface accepts keyboard input, rather
179 // than assuming it does not
180 // Layer surfaces with keyboard_interactive=true will change how this
181 // works, for example.
182 if (!surface || cont->type == C_VIEW) {
183 sway_seat_set_focus(cursor->seat, cont);
184 }
179 } 185 }
180 186
181 wlr_seat_pointer_notify_button(cursor->seat->wlr_seat, event->time_msec, 187 wlr_seat_pointer_notify_button(cursor->seat->wlr_seat, event->time_msec,