diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-04-18 00:10:32 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-04-18 00:10:32 +1000 |
commit | 72beae209b03815e39d0aaa11348fa17c8a7bca9 (patch) | |
tree | fefa256f93c8fa7a3e80f9fb54accd0e6108e77a /sway/commands/fullscreen.c | |
parent | Fix views unmapping their own fullscreen windows. (diff) | |
download | sway-72beae209b03815e39d0aaa11348fa17c8a7bca9.tar.gz sway-72beae209b03815e39d0aaa11348fa17c8a7bca9.tar.zst sway-72beae209b03815e39d0aaa11348fa17c8a7bca9.zip |
Fullscreen fixes.
Diffstat (limited to 'sway/commands/fullscreen.c')
-rw-r--r-- | sway/commands/fullscreen.c | 7 |
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 @@ | |||
6 | #include "sway/tree/view.h" | 6 | #include "sway/tree/view.h" |
7 | #include "sway/tree/layout.h" | 7 | #include "sway/tree/layout.h" |
8 | 8 | ||
9 | // fullscreen toggle|enable|disable | ||
10 | struct cmd_results *cmd_fullscreen(int argc, char **argv) { | 9 | struct cmd_results *cmd_fullscreen(int argc, char **argv) { |
10 | struct cmd_results *error = NULL; | ||
11 | if ((error = checkarg(argc, "fullscreen", EXPECTED_LESS_THAN, 2))) { | ||
12 | return error; | ||
13 | } | ||
11 | struct sway_container *container = | 14 | struct sway_container *container = |
12 | config->handler_context.current_container; | 15 | config->handler_context.current_container; |
13 | if (container->type != C_VIEW) { | 16 | if (container->type != C_VIEW) { |
@@ -25,7 +28,7 @@ struct cmd_results *cmd_fullscreen(int argc, char **argv) { | |||
25 | wants_fullscreen = false; | 28 | wants_fullscreen = false; |
26 | } else { | 29 | } else { |
27 | return cmd_results_new(CMD_INVALID, "fullscreen", | 30 | return cmd_results_new(CMD_INVALID, "fullscreen", |
28 | "Expected 'fullscreen' or fullscreen <enable|disable|toggle>'"); | 31 | "Expected 'fullscreen' or 'fullscreen <enable|disable|toggle>'"); |
29 | } | 32 | } |
30 | 33 | ||
31 | view_set_fullscreen(view, wants_fullscreen); | 34 | view_set_fullscreen(view, wants_fullscreen); |