From 009f11847b2a8311efad759be959497d78447163 Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Mon, 30 Mar 2009 15:49:44 +0200 Subject: [PATCH] Layout: Fix mirror layout (code simplify was bad) --- src/layout.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/layout.c b/src/layout.c index 872cd75..6c77164 100644 --- a/src/layout.c +++ b/src/layout.c @@ -543,11 +543,20 @@ mirror(int screen, Bool horizontal) /* Next y/x position */ if(i >= nmaster - 1) { - - if(i == nmaster || i == nmaster - 1) - cgeo.x = (horizontal) ? sg.x : nextg[isp].y + nextg[isp].height + BORDH + TBARH; + if(horizontal) + { + if(i == nmaster || i == nmaster - 1) + cgeo.x = sg.x; + else + cgeo.x = nextg[isp].x + nextg[isp].width + BORDH * 2; + } else - cgeo.y = (horizontal) ? nextg[isp].x + nextg[isp].width + BORDH * 2 : sg.y; + { + if(i == nmaster || i == nmaster - 1) + cgeo.y = sg.y; + else + cgeo.y = nextg[isp].y + nextg[isp].height + BORDH + TBARH; + } } else if (i <= nmaster - 1) {