aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/focus.c
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-07-19 16:41:02 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-07-19 16:41:02 +1000
commit08736255a3ba16f6b810fd4eee91fe4e1ab92e35 (patch)
tree36c343206946dcea3b89eadaab9384ce16045063 /sway/commands/focus.c
parenta173b79c5493d196f1414ab379d393c5f07840bc (diff)
Defer the focus commands
Diffstat (limited to 'sway/commands/focus.c')
-rw-r--r--sway/commands/focus.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c
index 2426a7f4..894025ad 100644
--- a/sway/commands/focus.c
+++ b/sway/commands/focus.c
@@ -84,6 +84,9 @@ static struct cmd_results *focus_output(struct sway_container *con,
}
struct cmd_results *cmd_focus(int argc, char **argv) {
+ if (config->reading || !config->active) {
+ return cmd_results_new(CMD_DEFER, NULL, NULL);
+ }
struct sway_container *con = config->handler_context.current_container;
struct sway_seat *seat = config->handler_context.seat;
if (con->type < C_WORKSPACE) {