summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Luminarys <kizunanohikari@gmail.com>2015-08-15 16:13:08 -0500
committerLibravatar Luminarys <kizunanohikari@gmail.com>2015-08-15 16:13:21 -0500
commit56814310e0c80ecd9aa8ba93f483f65f5f23fd70 (patch)
tree02c4cf738d0c79689f4c9544fa60b11141cf0efe
parentMerge branch 'master' of github.com:SirCmpwn/sway (diff)
downloadsway-56814310e0c80ecd9aa8ba93f483f65f5f23fd70.tar.gz
sway-56814310e0c80ecd9aa8ba93f483f65f5f23fd70.tar.zst
sway-56814310e0c80ecd9aa8ba93f483f65f5f23fd70.zip
Fixed reloading and arrange_windows
-rw-r--r--sway/layout.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/sway/layout.c b/sway/layout.c
index 3fd7f5c1..918da9f0 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -95,15 +95,28 @@ void arrange_windows(swayc_t *container, int width, int height) {
95 child->x = x; 95 child->x = x;
96 child->y = y; 96 child->y = y;
97 arrange_windows(child, -1, -1); 97 arrange_windows(child, -1, -1);
98 x += child->width; 98 // Removed for now because wlc works with relative positions
99 // Addition can be reconsidered once wlc positions are changed
100 // x += child->width;
99 } 101 }
100 return; 102 return;
101 case C_OUTPUT: 103 case C_OUTPUT:
102 container->width = width; 104 container->width = width;
103 container->height = height; 105 container->height = height;
104 x -= container->x; 106 // These lines make x/y negative and result in stuff glitching out
105 y -= container->y; 107 // Their addition can be reconsidered once wlc positions are changed
106 break; 108 // x -= container->x;
109 // y -= container->y;
110 for (i = 0; i < container->children->length; ++i) {
111 swayc_t *child = container->children->items[i];
112 sway_log(L_DEBUG, "Arranging workspace #%d", i);
113 child->x = x;
114 child->y = y;
115 child->width = width;
116 child->height = height;
117 arrange_windows(child, -1, -1);
118 }
119 return;
107 case C_VIEW: 120 case C_VIEW:
108 { 121 {
109 struct wlc_geometry geometry = { 122 struct wlc_geometry geometry = {