diff options
author | 2016-07-28 05:56:36 +0200 | |
---|---|---|
committer | 2016-07-28 05:56:36 +0200 | |
commit | a46cf77549ac6f30560c5eafbe17234e3e7c6dbd (patch) | |
tree | f5133714eb9ede72ca8f147816e92e0760bf9aad /sway/layout.c | |
parent | Merge pull request #790 from acrisci/bug/switch-focus-workspace-output (diff) | |
download | sway-a46cf77549ac6f30560c5eafbe17234e3e7c6dbd.tar.gz sway-a46cf77549ac6f30560c5eafbe17234e3e7c6dbd.tar.zst sway-a46cf77549ac6f30560c5eafbe17234e3e7c6dbd.zip |
bugfix: windows on empty workspaces with layout tabbed/stacked would spawn with 0x0 geometry
Diffstat (limited to 'sway/layout.c')
-rw-r--r-- | sway/layout.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/layout.c b/sway/layout.c index 1d5944f8..1a046da4 100644 --- a/sway/layout.c +++ b/sway/layout.c | |||
@@ -799,7 +799,9 @@ static void arrange_windows_r(swayc_t *container, double width, double height) { | |||
799 | } | 799 | } |
800 | 800 | ||
801 | // update container size if it's a direct child in a tabbed/stacked layout | 801 | // update container size if it's a direct child in a tabbed/stacked layout |
802 | if (swayc_tabbed_stacked_parent(container) != NULL) { | 802 | // if parent is a workspace, its actual_geometry won't be initialized |
803 | if (swayc_tabbed_stacked_parent(container) != NULL && | ||
804 | container->parent->type != C_WORKSPACE) { | ||
803 | // Use parent actual_geometry as a base for calculating | 805 | // Use parent actual_geometry as a base for calculating |
804 | // container geometry | 806 | // container geometry |
805 | container->width = container->parent->actual_geometry.size.w; | 807 | container->width = container->parent->actual_geometry.size.w; |