diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-26 00:03:44 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-10-26 00:03:44 +1000 |
commit | 885963f11fa031d9cb78d4a28788f8ee0a7769ec (patch) | |
tree | 6ee9577b8af7b68d85984e8f7ea03d8bf818d3d7 /sway/commands/fullscreen.c | |
parent | Merge pull request #2950 from emersion/presentation-time (diff) | |
download | sway-885963f11fa031d9cb78d4a28788f8ee0a7769ec.tar.gz sway-885963f11fa031d9cb78d4a28788f8ee0a7769ec.tar.zst sway-885963f11fa031d9cb78d4a28788f8ee0a7769ec.zip |
Deny several commands when there's no outputs connected
Diffstat (limited to 'sway/commands/fullscreen.c')
-rw-r--r-- | sway/commands/fullscreen.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/commands/fullscreen.c b/sway/commands/fullscreen.c index 0204a73c..ff7cbba7 100644 --- a/sway/commands/fullscreen.c +++ b/sway/commands/fullscreen.c | |||
@@ -12,6 +12,10 @@ struct cmd_results *cmd_fullscreen(int argc, char **argv) { | |||
12 | if ((error = checkarg(argc, "fullscreen", EXPECTED_AT_MOST, 1))) { | 12 | if ((error = checkarg(argc, "fullscreen", EXPECTED_AT_MOST, 1))) { |
13 | return error; | 13 | return error; |
14 | } | 14 | } |
15 | if (!root->outputs->length) { | ||
16 | return cmd_results_new(CMD_INVALID, "fullscreen", | ||
17 | "Can't run this command while there's no outputs connected."); | ||
18 | } | ||
15 | struct sway_node *node = config->handler_context.node; | 19 | struct sway_node *node = config->handler_context.node; |
16 | struct sway_container *container = config->handler_context.container; | 20 | struct sway_container *container = config->handler_context.container; |
17 | struct sway_workspace *workspace = config->handler_context.workspace; | 21 | struct sway_workspace *workspace = config->handler_context.workspace; |