Merge pull request #3229 from mwenzkowski/fix-fullscreen-cmd

Fix fullscreen command and improve documentation
This commit is contained in:
Brian Ashworth 2018-12-01 14:33:36 -05:00 committed by GitHub
commit 7702943e58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -13,14 +13,14 @@ struct cmd_results *cmd_fullscreen(int argc, char **argv) {
return error; return error;
} }
if (!root->outputs->length) { if (!root->outputs->length) {
return cmd_results_new(CMD_INVALID, "fullscreen", return cmd_results_new(CMD_FAILURE, "fullscreen",
"Can't run this command while there's no outputs connected."); "Can't run this command while there's no outputs connected.");
} }
struct sway_node *node = config->handler_context.node; struct sway_node *node = config->handler_context.node;
struct sway_container *container = config->handler_context.container; struct sway_container *container = config->handler_context.container;
struct sway_workspace *workspace = config->handler_context.workspace; struct sway_workspace *workspace = config->handler_context.workspace;
if (node->type == N_WORKSPACE && workspace->tiling->length == 0) { if (node->type == N_WORKSPACE && workspace->tiling->length == 0) {
return cmd_results_new(CMD_INVALID, "fullscreen", return cmd_results_new(CMD_FAILURE, "fullscreen",
"Can't fullscreen an empty workspace"); "Can't fullscreen an empty workspace");
} }
if (node->type == N_WORKSPACE) { if (node->type == N_WORKSPACE) {

View File

@ -130,8 +130,9 @@ They are expected to be used with *bindsym* or at runtime through *swaymsg*(1).
*focus* mode\_toggle *focus* mode\_toggle
Moves focus between the floating and tiled layers. Moves focus between the floating and tiled layers.
*fullscreen* *fullscreen* [enable|disable|toggle]
Toggles fullscreen for the focused view. Makes focused view fullscreen, non-fullscreen, or the opposite of what it
is now. If no argument is given, it does the same as _toggle_.
*gaps* inner|outer|horizontal|vertical|top|right|bottom|left all|current *gaps* inner|outer|horizontal|vertical|top|right|bottom|left all|current
set|plus|minus <amount> set|plus|minus <amount>