diff options
author | Ryan Dwyer <[email protected]> | 2018-06-29 20:04:24 +1000 |
---|---|---|
committer | Ryan Dwyer <[email protected]> | 2018-06-29 20:04:24 +1000 |
commit | a2fbb20a616444213ff3967b33eed7f4561e3978 (patch) | |
tree | 276a133eb78d6e0655bc164693650454d43a22ca /sway/input/cursor.c | |
parent | 3c81a900b766dd2c049ba7af6e603805893e0926 (diff) | |
parent | d3ea07f8283385d015e1d85b5fe9bc8a776fc7b4 (diff) |
Merge remote-tracking branch 'upstream/master' into atomic
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r-- | sway/input/cursor.c | 9 |
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 = |