diff options
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sway/commands.c b/sway/commands.c index 644b8005..3ac7f4dd 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -390,7 +390,6 @@ static bool cmd_layout(struct sway_config *config, int argc, char **argv) { | |||
390 | return false; | 390 | return false; |
391 | } | 391 | } |
392 | swayc_t *parent = get_focused_container(&root_container); | 392 | swayc_t *parent = get_focused_container(&root_container); |
393 | |||
394 | while (parent->type == C_VIEW) { | 393 | while (parent->type == C_VIEW) { |
395 | parent = parent->parent; | 394 | parent = parent->parent; |
396 | } | 395 | } |
@@ -512,9 +511,7 @@ static bool cmd_fullscreen(struct sway_config *config, int argc, char **argv) { | |||
512 | // Resize workspace if going from fullscreen -> notfullscreen | 511 | // Resize workspace if going from fullscreen -> notfullscreen |
513 | // otherwise just resize container | 512 | // otherwise just resize container |
514 | if (current) { | 513 | if (current) { |
515 | while (container->type != C_WORKSPACE) { | 514 | container = swayc_parent_by_type(container, C_WORKSPACE); |
516 | container = container->parent; | ||
517 | } | ||
518 | } | 515 | } |
519 | // Only resize container when going into fullscreen | 516 | // Only resize container when going into fullscreen |
520 | arrange_windows(container, -1, -1); | 517 | arrange_windows(container, -1, -1); |