aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-04-18 00:10:32 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-04-18 00:10:32 +1000
commit72beae209b03815e39d0aaa11348fa17c8a7bca9 (patch)
treefefa256f93c8fa7a3e80f9fb54accd0e6108e77a /sway/commands
parentcc4da245a8e4a746ebd379ca8dd6cc3b33ded8e4 (diff)
Fullscreen fixes.
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/fullscreen.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sway/commands/fullscreen.c b/sway/commands/fullscreen.c
index 5a044aa8..8692e92d 100644
--- a/sway/commands/fullscreen.c
+++ b/sway/commands/fullscreen.c
@@ -6,8 +6,11 @@
#include "sway/tree/view.h"
#include "sway/tree/layout.h"
-// fullscreen toggle|enable|disable
struct cmd_results *cmd_fullscreen(int argc, char **argv) {
+ struct cmd_results *error = NULL;
+ if ((error = checkarg(argc, "fullscreen", EXPECTED_LESS_THAN, 2))) {
+ return error;
+ }
struct sway_container *container =
config->handler_context.current_container;
if (container->type != C_VIEW) {
@@ -25,7 +28,7 @@ struct cmd_results *cmd_fullscreen(int argc, char **argv) {
wants_fullscreen = false;
} else {
return cmd_results_new(CMD_INVALID, "fullscreen",
- "Expected 'fullscreen' or fullscreen <enable|disable|toggle>'");
+ "Expected 'fullscreen' or 'fullscreen <enable|disable|toggle>'");
}
view_set_fullscreen(view, wants_fullscreen);