aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 96ac7b33..79f6ec46 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -109,9 +109,6 @@ static struct sway_container *container_at_coords(
109 } 109 }
110 110
111 struct sway_container *c; 111 struct sway_container *c;
112 if ((c = floating_container_at(lx, ly, surface, sx, sy))) {
113 return c;
114 }
115 if ((c = container_at(ws, lx, ly, surface, sx, sy))) { 112 if ((c = container_at(ws, lx, ly, surface, sx, sy))) {
116 return c; 113 return c;
117 } 114 }
@@ -349,7 +346,7 @@ void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
349 output = container_parent(c, C_OUTPUT); 346 output = container_parent(c, C_OUTPUT);
350 } 347 }
351 if (output != focus) { 348 if (output != focus) {
352 seat_set_focus_warp(seat, c, false); 349 seat_set_focus_warp(seat, c, false, true);
353 } 350 }
354 } else if (c->type == C_VIEW) { 351 } else if (c->type == C_VIEW) {
355 // Focus c if the following are true: 352 // Focus c if the following are true:
@@ -359,13 +356,13 @@ void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
359 if (!wlr_seat_keyboard_has_grab(cursor->seat->wlr_seat) && 356 if (!wlr_seat_keyboard_has_grab(cursor->seat->wlr_seat) &&
360 c != prev_c && 357 c != prev_c &&
361 view_is_visible(c->sway_view)) { 358 view_is_visible(c->sway_view)) {
362 seat_set_focus_warp(seat, c, false); 359 seat_set_focus_warp(seat, c, false, true);
363 } else { 360 } else {
364 struct sway_container *next_focus = 361 struct sway_container *next_focus =
365 seat_get_focus_inactive(seat, &root_container); 362 seat_get_focus_inactive(seat, &root_container);
366 if (next_focus && next_focus->type == C_VIEW && 363 if (next_focus && next_focus->type == C_VIEW &&
367 view_is_visible(next_focus->sway_view)) { 364 view_is_visible(next_focus->sway_view)) {
368 seat_set_focus_warp(seat, next_focus, false); 365 seat_set_focus_warp(seat, next_focus, false, true);
369 } 366 }
370 } 367 }
371 } 368 }