diff options
-rw-r--r-- | sway/layout.c | 21 | ||||
-rw-r--r-- | sway/main.c | 1 |
2 files changed, 18 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 = { |
diff --git a/sway/main.c b/sway/main.c index 061564e2..fedffdf7 100644 --- a/sway/main.c +++ b/sway/main.c | |||
@@ -22,6 +22,7 @@ int main(int argc, char **argv) { | |||
22 | sway_log(L_ERROR, "Config load failed, aborting sway post init!"); | 22 | sway_log(L_ERROR, "Config load failed, aborting sway post init!"); |
23 | } | 23 | } |
24 | 24 | ||
25 | setenv("WLC_IDLE_TIME", "0", 0); | ||
25 | setenv("WLC_DIM", "0", 0); | 26 | setenv("WLC_DIM", "0", 0); |
26 | if (!wlc_init(&interface, argc, argv)) { | 27 | if (!wlc_init(&interface, argc, argv)) { |
27 | return 1; | 28 | return 1; |