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

Fix border adjustments for resizing windows

This commit is contained in:
richard
2000-03-08 10:38:12 +00:00
parent db594a9b89
commit 2f09891b60

View File

@@ -1349,6 +1349,10 @@ wManageInternalWindow(WScreen *scr, Window window, Window owner,
wwin->frame->on_mousedown_resizebar = resizebarMouseDown;
wwin->client.y += wwin->frame->top_width;
if (!WFLAGP(wwin, no_border)) {
wwin->client.x += FRAME_BORDER_WIDTH;
wwin->client.y += FRAME_BORDER_WIDTH;
}
XReparentWindow(dpy, wwin->client_win, wwin->frame->core->window,
0, wwin->frame->top_width);
@@ -1584,7 +1588,7 @@ wUnmanageWindow(WWindow *wwin, Bool restore, Bool destroyed)
if (wasFocused) {
if (newFocusedWindow != owner && owner) {
if (wwin->flags.is_gnustep == 0)
if (owner->flags.is_gnustep == 0)
wFrameWindowChangeState(owner->frame, WS_UNFOCUSED);
}
wSetFocusTo(scr, newFocusedWindow);
@@ -1992,16 +1996,22 @@ int req_width, req_height; /* new size of the client */
|| req_width > wwin->frame->core->width))
XResizeWindow(dpy, wwin->client_win, req_width, req_height);
wwin->client.x = req_x;
wwin->client.y = req_y + wwin->frame->top_width;
wwin->client.width = req_width;
wwin->client.height = req_height;
} else {
wwin->client.x = req_x;
wwin->client.y = req_y + wwin->frame->top_width;
XMoveWindow(dpy, wwin->frame->core->window, req_x, req_y);
}
/*
* If the window was created with a frame border, adjust for it.
*/
wwin->client.x = req_x;
wwin->client.y = req_y + wwin->frame->top_width;
if (!WFLAGP(wwin, no_border)) {
wwin->client.x += FRAME_BORDER_WIDTH;
wwin->client.y += FRAME_BORDER_WIDTH;
}
wwin->frame_x = req_x;
wwin->frame_y = req_y;
@@ -2040,6 +2050,10 @@ int req_x, req_y; /* new position of the frame */
wwin->client.x = req_x;
wwin->client.y = req_y + wwin->frame->top_width;
if (!WFLAGP(wwin, no_border)) {
wwin->client.x += FRAME_BORDER_WIDTH;
wwin->client.y += FRAME_BORDER_WIDTH;
}
XMoveWindow(dpy, wwin->frame->core->window, req_x, req_y);