commit 8752a166ed5ecddd67fc383934c1c3a580ece49b
parent 824a3d81aad8e3eb81c80d07bf6554be9fe214cf
Author: taiyu <taiyu.len@gmail.com>
Date: Sat, 15 Aug 2015 14:35:55 -0700
Merge branch 'master' of https://github.com/SirCmpwn/sway
merging
Diffstat:
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/sway/layout.c b/sway/layout.c
@@ -95,15 +95,28 @@ void arrange_windows(swayc_t *container, int width, int height) {
child->x = x;
child->y = y;
arrange_windows(child, -1, -1);
- x += child->width;
+ // Removed for now because wlc works with relative positions
+ // Addition can be reconsidered once wlc positions are changed
+ // x += child->width;
}
return;
case C_OUTPUT:
container->width = width;
container->height = height;
- x -= container->x;
- y -= container->y;
- break;
+ // These lines make x/y negative and result in stuff glitching out
+ // Their addition can be reconsidered once wlc positions are changed
+ // x -= container->x;
+ // y -= container->y;
+ for (i = 0; i < container->children->length; ++i) {
+ swayc_t *child = container->children->items[i];
+ sway_log(L_DEBUG, "Arranging workspace #%d", i);
+ child->x = x;
+ child->y = y;
+ child->width = width;
+ child->height = height;
+ arrange_windows(child, -1, -1);
+ }
+ return;
case C_VIEW:
{
struct wlc_geometry geometry = {
diff --git a/sway/main.c b/sway/main.c
@@ -22,6 +22,7 @@ int main(int argc, char **argv) {
sway_log(L_ERROR, "Config load failed, aborting sway post init!");
}
+ setenv("WLC_IDLE_TIME", "0", 0);
setenv("WLC_DIM", "0", 0);
if (!wlc_init(&interface, argc, argv)) {
return 1;