diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-15 17:17:16 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-15 17:17:16 -0400 |
commit | 4014b215ebe39ad4b9c624c10f57a3660d5e626d (patch) | |
tree | 02c4cf738d0c79689f4c9544fa60b11141cf0efe | |
parent | Merge branch 'master' of github.com:SirCmpwn/sway (diff) | |
parent | Fixed reloading and arrange_windows (diff) | |
download | sway-4014b215ebe39ad4b9c624c10f57a3660d5e626d.tar.gz sway-4014b215ebe39ad4b9c624c10f57a3660d5e626d.tar.zst sway-4014b215ebe39ad4b9c624c10f57a3660d5e626d.zip |
Merge pull request #33 from Luminarys/master
Fixed reloading and arrange_windows
-rw-r--r-- | sway/layout.c | 21 |
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 = { |