aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 742d6b86..20e0fc8d 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -286,6 +286,14 @@ static bool cmd_fullscreen(struct sway_config *config, int argc, char **argv) {
286 swayc_t *container = get_focused_container(&root_container); 286 swayc_t *container = get_focused_container(&root_container);
287 bool current = (wlc_view_get_state(container->handle) & WLC_BIT_FULLSCREEN) > 0; 287 bool current = (wlc_view_get_state(container->handle) & WLC_BIT_FULLSCREEN) > 0;
288 wlc_view_set_state(container->handle, WLC_BIT_FULLSCREEN, !current); 288 wlc_view_set_state(container->handle, WLC_BIT_FULLSCREEN, !current);
289 //Resize workspace if going from fullscreen -> notfullscreen
290 //otherwise just resize container
291 if (current) {
292 while (container->type != C_WORKSPACE) {
293 container = container->parent;
294 }
295 }
296 //Only resize container when going into fullscreen
289 arrange_windows(container, -1, -1); 297 arrange_windows(container, -1, -1);
290 298
291 return true; 299 return true;