summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-06-24 17:45:03 -0700
committerLibravatar GitHub <noreply@github.com>2018-06-24 17:45:03 -0700
commit59086fabbfaa545641827b0e181100027de08205 (patch)
tree25964d55bfcecdcf38f28dc2278cb21b199570ff
parentMerge pull request #2155 from ael-code/fix_output_command_failure (diff)
parentdont focus-follow-mouse when keyboard grab (diff)
downloadsway-59086fabbfaa545641827b0e181100027de08205.tar.gz
sway-59086fabbfaa545641827b0e181100027de08205.tar.zst
sway-59086fabbfaa545641827b0e181100027de08205.zip
Merge pull request #2159 from acrisci/focus-dont-follow-keyboard-grab
dont focus-follow-mouse when keyboard grab
-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,
174 seat_set_focus_warp(seat, c, false); 174 seat_set_focus_warp(seat, c, false);
175 } 175 }
176 } else if (c->type == C_VIEW) { 176 } else if (c->type == C_VIEW) {
177 // Focus c if both of the following are true: 177 // Focus c if the following are true:
178 // - cursor is over a new view, i.e. entered a new window; and 178 // - cursor is over a new view, i.e. entered a new window; and
179 // - the new view is visible, i.e. not hidden in a stack or tab. 179 // - the new view is visible, i.e. not hidden in a stack or tab; and
180 if (c != prev_c && view_is_visible(c->sway_view)) { 180 // - the seat does not have a keyboard grab
181 if (!wlr_seat_keyboard_has_grab(cursor->seat->wlr_seat) &&
182 c != prev_c &&
183 view_is_visible(c->sway_view)) {
181 seat_set_focus_warp(seat, c, false); 184 seat_set_focus_warp(seat, c, false);
182 } else { 185 } else {
183 struct sway_container *next_focus = 186 struct sway_container *next_focus =