commit b5a21a08c7f216399af48d66ce2a4223cb4855c0
parent 1f4a590c18e123e7e44bacd3b7890ebcaf084b80
Author: Drew DeVault <sir@cmpwn.com>
Date: Tue, 29 Dec 2015 22:19:28 -0500
Merge pull request #419 from crondog/fullscreen
Dont try and fullscreen a workspace with no views
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/sway/commands.c b/sway/commands.c
@@ -1435,6 +1435,9 @@ static struct cmd_results *cmd_fullscreen(int argc, char **argv) {
return error;
}
swayc_t *container = get_focused_view(&root_container);
+ if(container->type != C_VIEW){
+ return cmd_results_new(CMD_INVALID, "fullscreen", "Only views can fullscreen");
+ }
swayc_t *workspace = swayc_parent_by_type(container, C_WORKSPACE);
bool current = swayc_is_fullscreen(container);
wlc_view_set_state(container->handle, WLC_BIT_FULLSCREEN, !current);