diff options
-rw-r--r-- | sway/commands.c | 3 |
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); |