summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2015-12-29 22:19:28 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2015-12-29 22:19:28 -0500
commitb5a21a08c7f216399af48d66ce2a4223cb4855c0 (patch)
treef4fc34b1e69b206b7ccf8368239762839ce68936
parentMerge pull request #417 from mikkeloscar/remove-log-line (diff)
parentDont try and fullscreen a workspace with no views (diff)
downloadsway-b5a21a08c7f216399af48d66ce2a4223cb4855c0.tar.gz
sway-b5a21a08c7f216399af48d66ce2a4223cb4855c0.tar.zst
sway-b5a21a08c7f216399af48d66ce2a4223cb4855c0.zip
Merge pull request #419 from crondog/fullscreen
Dont try and fullscreen a workspace with no views
-rw-r--r--sway/commands.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c
index fe341cd5..4d5018a0 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -1435,6 +1435,9 @@ static struct cmd_results *cmd_fullscreen(int argc, char **argv) {
1435 return error; 1435 return error;
1436 } 1436 }
1437 swayc_t *container = get_focused_view(&root_container); 1437 swayc_t *container = get_focused_view(&root_container);
1438 if(container->type != C_VIEW){
1439 return cmd_results_new(CMD_INVALID, "fullscreen", "Only views can fullscreen");
1440 }
1438 swayc_t *workspace = swayc_parent_by_type(container, C_WORKSPACE); 1441 swayc_t *workspace = swayc_parent_by_type(container, C_WORKSPACE);
1439 bool current = swayc_is_fullscreen(container); 1442 bool current = swayc_is_fullscreen(container);
1440 wlc_view_set_state(container->handle, WLC_BIT_FULLSCREEN, !current); 1443 wlc_view_set_state(container->handle, WLC_BIT_FULLSCREEN, !current);