From 09b28b92f141ef2fff59e8bd2edfa15d2e58fade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= Date: Wed, 13 Nov 2013 15:39:12 +0100 Subject: [PATCH] make adjustments for dock when calculating area for miniwindows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes bug report: The 0.80.2 and older versions allowed the miniwindows to lay down in parallel with wmdock (if one wanted it that way) but newer Windowmaker versions could only partially simulate such behavior and that includes to either setting an option NoWindowOverDock to yes or to manually set the dock to "Keep on Top". Reported-by: Josip Deanovic Signed-off-by: Amadeusz Sławiński --- src/actions.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/actions.c b/src/actions.c index f9da91c3..60e1174a 100644 --- a/src/actions.c +++ b/src/actions.c @@ -1740,7 +1740,19 @@ void wArrangeIcons(WScreen *scr, Bool arrangeAll) for (head = 0; head < heads; ++head) { WArea area = wGetUsableAreaForHead(scr, head, NULL, False); - WMRect rect = wmkrect(area.x1, area.y1, area.x2 - area.x1, area.y2 - area.y1); + WMRect rect; + + if (scr->dock) { + int offset = wPreferences.icon_size + DOCK_EXTRA_SPACE; + + if (scr->dock->on_right_side) + area.x2 -= offset; + else + area.x1 += offset; + } + + rect = wmkrect(area.x1, area.y1, area.x2 - area.x1, area.y2 - area.y1); + vars[head].pi = vars[head].si = 0; vars[head].sx1 = rect.pos.x; vars[head].sy1 = rect.pos.y;