diff options
Diffstat (limited to 'sway/commands/floating.c')
-rw-r--r-- | sway/commands/floating.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/commands/floating.c b/sway/commands/floating.c index 97662a18..81bb86f8 100644 --- a/sway/commands/floating.c +++ b/sway/commands/floating.c | |||
@@ -15,6 +15,10 @@ struct cmd_results *cmd_floating(int argc, char **argv) { | |||
15 | if ((error = checkarg(argc, "floating", EXPECTED_EQUAL_TO, 1))) { | 15 | if ((error = checkarg(argc, "floating", EXPECTED_EQUAL_TO, 1))) { |
16 | return error; | 16 | return error; |
17 | } | 17 | } |
18 | if (!root->outputs->length) { | ||
19 | return cmd_results_new(CMD_INVALID, "floating", | ||
20 | "Can't run this command while there's no outputs connected."); | ||
21 | } | ||
18 | struct sway_container *container = config->handler_context.container; | 22 | struct sway_container *container = config->handler_context.container; |
19 | struct sway_workspace *workspace = config->handler_context.workspace; | 23 | struct sway_workspace *workspace = config->handler_context.workspace; |
20 | if (!container && workspace->tiling->length == 0) { | 24 | if (!container && workspace->tiling->length == 0) { |