aboutsummaryrefslogtreecommitdiff
path: root/sway/input
diff options
context:
space:
mode:
authorRyan Dwyer <RyanDwyer@users.noreply.github.com>2018-06-27 13:21:00 +1000
committerGitHub <noreply@github.com>2018-06-27 13:21:00 +1000
commitbf380813829b11d42ff0703630600e5bee06098b (patch)
tree0c0951e0ec5c36a6de14535903092b539bdbbf9b /sway/input
parenteeb38d65cbf5c8452c449b9f5e003bd255ca6a53 (diff)
parentf0f50c31d5e40f3dbe80c60d01bafc80c3bd24c0 (diff)
downloadsway-bf380813829b11d42ff0703630600e5bee06098b.tar.xz
Merge branch 'master' into xwayland-wants-float
Diffstat (limited to 'sway/input')
-rw-r--r--sway/input/cursor.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 37a87756..944e35aa 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -174,10 +174,13 @@ void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
seat_set_focus_warp(seat, c, false);
}
} else if (c->type == C_VIEW) {
- // Focus c if both of the following are true:
+ // Focus c if the following are true:
// - cursor is over a new view, i.e. entered a new window; and
- // - the new view is visible, i.e. not hidden in a stack or tab.
- if (c != prev_c && view_is_visible(c->sway_view)) {
+ // - the new view is visible, i.e. not hidden in a stack or tab; and
+ // - the seat does not have a keyboard grab
+ if (!wlr_seat_keyboard_has_grab(cursor->seat->wlr_seat) &&
+ c != prev_c &&
+ view_is_visible(c->sway_view)) {
seat_set_focus_warp(seat, c, false);
} else {
struct sway_container *next_focus =