From: Carlos R. Mafra Date: Tue, 18 Dec 2012 18:29:11 +0000 (+0000) Subject: Revert "Prevent windows from drifting on restart." X-Git-Tag: wmaker-0.95.4~5 X-Git-Url: https://repo.or.cz/w/wmaker-crm.git/commitdiff_plain/b02a12b8c1f6c232229fe3cb191bf00259b36d18 Revert "Prevent windows from drifting on restart." This reverts commit 3cd382bccc46b957c9a699fe5fa827f32704dfcd. Conflicts: src/window.c --- diff --git a/src/window.c b/src/window.c index f0df2698..4051035d 100644 --- a/src/window.c +++ b/src/window.c @@ -1140,7 +1140,11 @@ WWindow *wManageWindow(WScreen *scr, Window window) y -= wwin->frame->top_width + wwin->frame->bottom_width; } - { + /* wWindowConfigure() will account for the window border + * when placing so the window would be shifted without + * the adjustment below + */ + if (HAS_BORDER(wwin)) { WMRect rect; WArea usableArea; int head; @@ -1153,21 +1157,10 @@ WWindow *wManageWindow(WScreen *scr, Window window) head = wGetHeadForRect(scr, rect); usableArea = wGetUsableAreaForHead(scr, head, NULL, True); - /* wWindowConfigure() will account for the frame - * when placing so the window would be shifted without - * the adjustment below */ - if (y >= usableArea.y1 + wwin->frame->top_width) - y -= wwin->frame->top_width; - - /* wWindowConfigure() will account for the window border - * when placing so the window would be shifted without - * the adjustment below */ - if (HAS_BORDER(wwin)) { - if (x >= usableArea.x1 + FRAME_BORDER_WIDTH) - x -= FRAME_BORDER_WIDTH; - if (y >= usableArea.y1 + FRAME_BORDER_WIDTH) - y -= FRAME_BORDER_WIDTH; - } + if (x >= usableArea.x1 + 2 * FRAME_BORDER_WIDTH) + x -= 2 * FRAME_BORDER_WIDTH; + if (y >= usableArea.y1 + 2 * FRAME_BORDER_WIDTH) + y -= 2 * FRAME_BORDER_WIDTH; } /*