aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/focus.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/focus.c')
-rw-r--r--sway/commands/focus.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c
index 56c3d981..79b7aed5 100644
--- a/sway/commands/focus.c
+++ b/sway/commands/focus.c
@@ -268,7 +268,16 @@ static struct cmd_results *focus_mode(struct sway_workspace *ws,
268 } 268 }
269 if (new_focus) { 269 if (new_focus) {
270 seat_set_focus_container(seat, new_focus); 270 seat_set_focus_container(seat, new_focus);
271 seat_consider_warp_to_focus(seat); 271
272 // If we're on the floating layer and the floating container area
273 // overlaps the position on the tiling layer that would be warped to,
274 // `seat_consider_warp_to_focus` would decide not to warp, but we need
275 // to anyway.
276 if (config->mouse_warping == WARP_CONTAINER) {
277 cursor_warp_to_container(seat->cursor, new_focus, true);
278 } else {
279 seat_consider_warp_to_focus(seat);
280 }
272 } else { 281 } else {
273 return cmd_results_new(CMD_FAILURE, 282 return cmd_results_new(CMD_FAILURE,
274 "Failed to find a %s container in workspace", 283 "Failed to find a %s container in workspace",