aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/focus.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-09-06 12:56:21 +0200
committerGitHub <noreply@github.com>2018-09-06 12:56:21 +0200
commit8e2a2e5ca457c73a62857bd9860c8e34d07ab78e (patch)
treeff0b87cfe7158e00501e9dc8a571e3b8cce2dbe0 /sway/commands/focus.c
parent6ab38ba098cbdbc88dd0460dcd24b24c2c548d07 (diff)
parent908095ef9a479cafaf7d815824f243b4576ff1bb (diff)
Merge pull request #2589 from RyanDwyer/seat-set-focus-type
Introduce seat_set_focus_container and seat_set_focus_workspace
Diffstat (limited to 'sway/commands/focus.c')
-rw-r--r--sway/commands/focus.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c
index 58721b7e..668a0c7b 100644
--- a/sway/commands/focus.c
+++ b/sway/commands/focus.c
@@ -179,7 +179,7 @@ static struct cmd_results *focus_mode(struct sway_workspace *ws,
new_focus = seat_get_focus_inactive_tiling(seat, ws);
}
if (new_focus) {
- seat_set_focus(seat, &new_focus->node);
+ seat_set_focus_container(seat, new_focus);
} else {
return cmd_results_new(CMD_FAILURE, "focus",
"Failed to find a %s container in workspace",
@@ -230,8 +230,8 @@ struct cmd_results *cmd_focus(int argc, char **argv) {
"Command 'focus' cannot be used above the workspace level");
}
- if (argc == 0) {
- seat_set_focus(seat, node);
+ if (argc == 0 && container) {
+ seat_set_focus_container(seat, container);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}