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.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c
index 76d3f1dc..135a2908 100644
--- a/sway/commands/focus.c
+++ b/sway/commands/focus.c
@@ -46,14 +46,13 @@ static struct cmd_results *focus_mode(struct sway_container *con,
46 46
47 struct sway_container *new_focus = NULL; 47 struct sway_container *new_focus = NULL;
48 if (floating) { 48 if (floating) {
49 new_focus = seat_get_focus_inactive(seat, ws->sway_workspace->floating); 49 new_focus = seat_get_focus_inactive_floating(seat, ws);
50 } else { 50 } else {
51 new_focus = seat_get_focus_inactive_tiling(seat, ws); 51 new_focus = seat_get_focus_inactive_tiling(seat, ws);
52 } 52 }
53 if (!new_focus) { 53 if (new_focus) {
54 new_focus = ws; 54 seat_set_focus(seat, new_focus);
55 } 55 }
56 seat_set_focus(seat, new_focus);
57 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 56 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
58} 57}
59 58