diff options
-rw-r--r-- | sway/layout.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sway/layout.c b/sway/layout.c index f9ea5cdc..fa613211 100644 --- a/sway/layout.c +++ b/sway/layout.c | |||
@@ -790,7 +790,8 @@ static void arrange_windows_r(swayc_t *container, double width, double height) { | |||
790 | y = container->y; | 790 | y = container->y; |
791 | 791 | ||
792 | // add gaps to top level tapped/stacked container | 792 | // add gaps to top level tapped/stacked container |
793 | if (container->layout == L_TABBED || container->layout == L_STACKED) { | 793 | if (container->parent->type == C_WORKSPACE && |
794 | (container->layout == L_TABBED || container->layout == L_STACKED)) { | ||
794 | update_geometry(container); | 795 | update_geometry(container); |
795 | width = container->border_geometry.size.w; | 796 | width = container->border_geometry.size.w; |
796 | height = container->border_geometry.size.h; | 797 | height = container->border_geometry.size.h; |
@@ -799,13 +800,14 @@ static void arrange_windows_r(swayc_t *container, double width, double height) { | |||
799 | } | 800 | } |
800 | 801 | ||
801 | // update container size if it's a child in a tabbed/stacked layout | 802 | // update container size if it's a child in a tabbed/stacked layout |
802 | if (swayc_is_tabbed_stacked(container)) { | 803 | if (swayc_tabbed_stacked_parent(container) != NULL) { |
803 | // Use parent border_geometry as a base for calculating | 804 | // Use parent actual_geometry as a base for calculating |
804 | // container geometry | 805 | // container geometry |
805 | container->width = container->parent->border_geometry.size.w; | 806 | container->width = container->parent->actual_geometry.size.w; |
806 | container->height = container->parent->border_geometry.size.h; | 807 | container->height = container->parent->actual_geometry.size.h; |
807 | container->x = container->parent->border_geometry.origin.x; | 808 | container->x = container->parent->actual_geometry.origin.x; |
808 | container->y = container->parent->border_geometry.origin.y; | 809 | container->y = container->parent->actual_geometry.origin.y; |
810 | |||
809 | update_geometry(container); | 811 | update_geometry(container); |
810 | width = container->width = container->actual_geometry.size.w; | 812 | width = container->width = container->actual_geometry.size.w; |
811 | height = container->height = container->actual_geometry.size.h; | 813 | height = container->height = container->actual_geometry.size.h; |