summaryrefslogtreecommitdiff
path: root/sway/commands/focus.c
diff options
context:
space:
mode:
authorRyan Dwyer <[email protected]>2018-08-19 16:16:32 +1000
committerGitHub <[email protected]>2018-08-19 16:16:32 +1000
commit389d159c81502aa8b951895de11c3720bbd5ba7d (patch)
treec5d96041e3270b1d1d50f8a42d91652d615c9938 /sway/commands/focus.c
parentd0a24465d75cc7197ee253e1de9fa961071cd034 (diff)
parent7f22fab3895ff090d5e26936f4e964e081090164 (diff)
Merge pull request #2453 from ianyfan/commands
More commands
Diffstat (limited to 'sway/commands/focus.c')
-rw-r--r--sway/commands/focus.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c
index 135a2908..fe15b4c7 100644
--- a/sway/commands/focus.c
+++ b/sway/commands/focus.c
@@ -52,6 +52,10 @@ static struct cmd_results *focus_mode(struct sway_container *con,
}
if (new_focus) {
seat_set_focus(seat, new_focus);
+ } else {
+ return cmd_results_new(CMD_FAILURE, "focus",
+ "Failed to find a %s container in workspace",
+ floating ? "floating" : "tiling");
}
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}