1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

Fixed regression when placing windows.

The initial fix for the bug reported by Paul Seelig whereby windows
would drift on restart introduced two regressions.

New windows would place higher on the screen than intended, possibly
obscuring the bottoms of other windows with their titlebars, and all
windows would jump vertically at shutdown because we weren't restoring
them to where they were before they had a titlebar and border.
This commit is contained in:
Iain Patterson
2012-11-16 14:43:52 -08:00
committed by Carlos R. Mafra
parent 3cd382bccc
commit 4e193c172b
3 changed files with 16 additions and 6 deletions

View File

@@ -591,6 +591,7 @@ WWindow *wManageWindow(WScreen *scr, Window window)
char *title;
Bool withdraw = False;
Bool raise = False;
Bool frame_adjustment = True;
/* mutex. */
XGrabServer(dpy);
@@ -994,6 +995,7 @@ WWindow *wManageWindow(WScreen *scr, Window window)
} else {
PlaceWindow(wwin, &x, &y, width, height);
frame_adjustment = False;
}
if (wPreferences.window_placement == WPM_MANUAL) {
dontBring = True;
@@ -1144,7 +1146,7 @@ WWindow *wManageWindow(WScreen *scr, Window window)
y -= wwin->frame->top_width + wwin->frame->bottom_width;
}
{
if (frame_adjustment) {
WMRect rect;
WArea usableArea;
int head;
@@ -1161,7 +1163,6 @@ WWindow *wManageWindow(WScreen *scr, Window window)
* 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;