Rootless: mi doesn't let us resize root, so we need to do it ourselves...
(cherry picked from commit c1ec36e28c
)
This commit is contained in:
parent
efa65a0317
commit
6acc2acd0d
|
@ -1338,34 +1338,55 @@ RootlessResizeWindow(WindowPtr pWin, int x, int y,
|
||||||
RegionRec saveRoot;
|
RegionRec saveRoot;
|
||||||
|
|
||||||
RL_DEBUG_MSG("resizewindow start (win 0x%x) ", pWin);
|
RL_DEBUG_MSG("resizewindow start (win 0x%x) ", pWin);
|
||||||
|
|
||||||
|
if(pWin->parent) {
|
||||||
|
if (winRec) {
|
||||||
|
oldBW = winRec->borderWidth;
|
||||||
|
oldX = winRec->x;
|
||||||
|
oldY = winRec->y;
|
||||||
|
oldW = winRec->width;
|
||||||
|
oldH = winRec->height;
|
||||||
|
|
||||||
if (winRec) {
|
newBW = oldBW;
|
||||||
oldBW = winRec->borderWidth;
|
newX = x;
|
||||||
oldX = winRec->x;
|
newY = y;
|
||||||
oldY = winRec->y;
|
newW = w + 2*newBW;
|
||||||
oldW = winRec->width;
|
newH = h + 2*newBW;
|
||||||
oldH = winRec->height;
|
|
||||||
|
|
||||||
newBW = oldBW;
|
resize_after = StartFrameResize(pWin, TRUE,
|
||||||
newX = x;
|
oldX, oldY, oldW, oldH, oldBW,
|
||||||
newY = y;
|
newX, newY, newW, newH, newBW);
|
||||||
newW = w + 2*newBW;
|
}
|
||||||
newH = h + 2*newBW;
|
|
||||||
|
|
||||||
resize_after = StartFrameResize(pWin, TRUE,
|
HUGE_ROOT(pWin);
|
||||||
oldX, oldY, oldW, oldH, oldBW,
|
SCREEN_UNWRAP(pScreen, ResizeWindow);
|
||||||
newX, newY, newW, newH, newBW);
|
pScreen->ResizeWindow(pWin, x, y, w, h, pSib);
|
||||||
}
|
SCREEN_WRAP(pScreen, ResizeWindow);
|
||||||
|
NORMAL_ROOT(pWin);
|
||||||
|
|
||||||
HUGE_ROOT(pWin);
|
if (winRec) {
|
||||||
SCREEN_UNWRAP(pScreen, ResizeWindow);
|
FinishFrameResize(pWin, TRUE, oldX, oldY, oldW, oldH, oldBW,
|
||||||
pScreen->ResizeWindow(pWin, x, y, w, h, pSib);
|
newX, newY, newW, newH, newBW, resize_after);
|
||||||
SCREEN_WRAP(pScreen, ResizeWindow);
|
}
|
||||||
NORMAL_ROOT(pWin);
|
} else {
|
||||||
|
/* Special case for resizing the root window */
|
||||||
|
BoxRec box;
|
||||||
|
|
||||||
if (winRec) {
|
pWin->drawable.x = x;
|
||||||
FinishFrameResize(pWin, TRUE, oldX, oldY, oldW, oldH, oldBW,
|
pWin->drawable.y = y;
|
||||||
newX, newY, newW, newH, newBW, resize_after);
|
pWin->drawable.width = w;
|
||||||
|
pWin->drawable.height = h;
|
||||||
|
|
||||||
|
box.x1 = x; box.y1 = y;
|
||||||
|
box.x2 = x + w; box.y2 = y + h;
|
||||||
|
REGION_UNINIT(pScreen, &pWin->winSize);
|
||||||
|
REGION_INIT(pScreen, &pWin->winSize, &box, 1);
|
||||||
|
REGION_COPY(pScreen, &pWin->borderSize, &pWin->winSize);
|
||||||
|
REGION_COPY(pScreen, &pWin->clipList, &pWin->winSize);
|
||||||
|
REGION_COPY(pScreen, &pWin->borderClip, &pWin->winSize);
|
||||||
|
|
||||||
|
miSendExposures(pWin, &pWin->borderClip,
|
||||||
|
pWin->drawable.x, pWin->drawable.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
RL_DEBUG_MSG("resizewindow end\n");
|
RL_DEBUG_MSG("resizewindow end\n");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user