From 2ed9c12ee5baf092451b2979c0add711e216d04f Mon Sep 17 00:00:00 2001 From: klaasvakie Date: Mon, 31 Aug 2009 23:33:36 +0200 Subject: [PATCH] Fix half_scr_width calculation Moved the half_scr_width calculation to after the usableArea = wGetUsableAreaForHead(scr, head, &totalArea, True); call. This fixes the problem where windows that get "half screen maximized" cover the dock or clip. --- src/actions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/actions.c b/src/actions.c index cd7faa10..e3e2249b 100644 --- a/src/actions.c +++ b/src/actions.c @@ -303,7 +303,6 @@ void wMaximizeWindow(WWindow * wwin, int directions) totalArea.x2 = wwin->screen_ptr->scr_width; totalArea.y2 = wwin->screen_ptr->scr_height; usableArea = totalArea; - half_scr_width = (usableArea.x2 - usableArea.x1)/2; if (!(directions & MAX_IGNORE_XINERAMA)) { WScreen *scr = wwin->screen_ptr; @@ -320,6 +319,7 @@ void wMaximizeWindow(WWindow * wwin, int directions) if (WFLAGP(wwin, full_maximize)) { usableArea = totalArea; } + half_scr_width = (usableArea.x2 - usableArea.x1)/2; if (wwin->flags.shaded) { wwin->flags.skip_next_animation = 1;