diff options
-rw-r--r-- | sway/commands/focus.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c index e31898af..30cfa1c5 100644 --- a/sway/commands/focus.c +++ b/sway/commands/focus.c | |||
@@ -255,6 +255,10 @@ struct cmd_results *cmd_focus(int argc, char **argv) { | |||
255 | // A workspace is focused, so just jump to the next output | 255 | // A workspace is focused, so just jump to the next output |
256 | struct sway_output *new_output = | 256 | struct sway_output *new_output = |
257 | output_get_in_direction(workspace->output, direction); | 257 | output_get_in_direction(workspace->output, direction); |
258 | if (!new_output) { | ||
259 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | ||
260 | } | ||
261 | |||
258 | struct sway_node *node = | 262 | struct sway_node *node = |
259 | get_node_in_output_direction(new_output, direction); | 263 | get_node_in_output_direction(new_output, direction); |
260 | seat_set_focus(seat, node); | 264 | seat_set_focus(seat, node); |