mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dtwm: Create stretcher windows when regenerate a frame for a frameless
window to make the resize cursors show again.
This commit is contained in:
parent
d90f765c0a
commit
7734a01e41
2 changed files with 18 additions and 10 deletions
|
@ -1332,6 +1332,8 @@ void CreateStretcherWindows (ClientData *pcd)
|
||||||
unsigned long attr_mask;
|
unsigned long attr_mask;
|
||||||
|
|
||||||
for (iWin = 0; iWin < STRETCH_COUNT; iWin++) {
|
for (iWin = 0; iWin < STRETCH_COUNT; iWin++) {
|
||||||
|
if (pcd->clientStretchWin[iWin]) continue;
|
||||||
|
|
||||||
switch (iWin) {
|
switch (iWin) {
|
||||||
case STRETCH_NORTH_WEST:
|
case STRETCH_NORTH_WEST:
|
||||||
GetFramePartInfo (pcd, FRAME_RESIZE_NW,
|
GetFramePartInfo (pcd, FRAME_RESIZE_NW,
|
||||||
|
@ -2301,16 +2303,6 @@ void RegenerateClientFrame (ClientData *pcd)
|
||||||
XMoveResizeWindow (DISPLAY, pcd->clientFrameWin, pcd->frameInfo.x,
|
XMoveResizeWindow (DISPLAY, pcd->clientFrameWin, pcd->frameInfo.x,
|
||||||
pcd->frameInfo.y, pcd->frameInfo.width, pcd->frameInfo.height);
|
pcd->frameInfo.y, pcd->frameInfo.width, pcd->frameInfo.height);
|
||||||
|
|
||||||
|
|
||||||
/* resize title bar window */
|
|
||||||
if (decor & MWM_DECOR_TITLE && !pcd->clientTitleWin)
|
|
||||||
{
|
|
||||||
CreateTitleBarWindow (pcd);
|
|
||||||
XResizeWindow (DISPLAY, pcd->clientTitleWin,
|
|
||||||
pcd->frameInfo.width - 2*pcd->frameInfo.upperBorderWidth,
|
|
||||||
pcd->frameInfo.titleBarHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* resize base window */
|
/* resize base window */
|
||||||
XMoveResizeWindow (DISPLAY, pcd->clientBaseWin,
|
XMoveResizeWindow (DISPLAY, pcd->clientBaseWin,
|
||||||
BaseWindowX (pcd), BaseWindowY (pcd),
|
BaseWindowX (pcd), BaseWindowY (pcd),
|
||||||
|
@ -2318,6 +2310,8 @@ void RegenerateClientFrame (ClientData *pcd)
|
||||||
|
|
||||||
/* resize the stretcher windows */
|
/* resize the stretcher windows */
|
||||||
if (SHOW_RESIZE_CURSORS(pcd) && (decor & MWM_DECOR_RESIZEH)) {
|
if (SHOW_RESIZE_CURSORS(pcd) && (decor & MWM_DECOR_RESIZEH)) {
|
||||||
|
CreateStretcherWindows (pcd);
|
||||||
|
|
||||||
XMoveResizeWindow (DISPLAY,
|
XMoveResizeWindow (DISPLAY,
|
||||||
pcd->clientStretchWin[STRETCH_NORTH_WEST],
|
pcd->clientStretchWin[STRETCH_NORTH_WEST],
|
||||||
0, 0, pcd->frameInfo.cornerWidth,
|
0, 0, pcd->frameInfo.cornerWidth,
|
||||||
|
@ -2366,6 +2360,15 @@ void RegenerateClientFrame (ClientData *pcd)
|
||||||
pcd->frameInfo.height - 2*pcd->frameInfo.cornerHeight);
|
pcd->frameInfo.height - 2*pcd->frameInfo.cornerHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* resize title bar window */
|
||||||
|
if (decor & MWM_DECOR_TITLE && !pcd->clientTitleWin)
|
||||||
|
{
|
||||||
|
CreateTitleBarWindow (pcd);
|
||||||
|
XResizeWindow (DISPLAY, pcd->clientTitleWin,
|
||||||
|
pcd->frameInfo.width - 2*pcd->frameInfo.upperBorderWidth,
|
||||||
|
pcd->frameInfo.titleBarHeight);
|
||||||
|
}
|
||||||
|
|
||||||
/* recreate gadget rectangles */
|
/* recreate gadget rectangles */
|
||||||
AllocateGadgetRectangles (pcd);
|
AllocateGadgetRectangles (pcd);
|
||||||
ComputeGadgetRectangles (pcd);
|
ComputeGadgetRectangles (pcd);
|
||||||
|
@ -2378,6 +2381,8 @@ void RegenerateClientFrame (ClientData *pcd)
|
||||||
SetFrameShape (pcd);
|
SetFrameShape (pcd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* map all subwindows of client frame */
|
||||||
|
XMapSubwindows(DISPLAY, pcd->clientFrameWin);
|
||||||
} /* END OF FUNCTION RegenerateClientFrame */
|
} /* END OF FUNCTION RegenerateClientFrame */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -113,6 +113,7 @@ WmWorkspaceData *pIconBoxInitialWS;
|
||||||
ClientData *
|
ClientData *
|
||||||
InitClientData (Window clientWindow)
|
InitClientData (Window clientWindow)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
ClientData *pCD;
|
ClientData *pCD;
|
||||||
|
|
||||||
if (!XFindContext (DISPLAY, clientWindow, wmGD.windowContextType,
|
if (!XFindContext (DISPLAY, clientWindow, wmGD.windowContextType,
|
||||||
|
@ -221,6 +222,8 @@ InitClientData (Window clientWindow)
|
||||||
pCD->enterFullscreen = False;
|
pCD->enterFullscreen = False;
|
||||||
pCD->monitorSizeIsSet = False;
|
pCD->monitorSizeIsSet = False;
|
||||||
|
|
||||||
|
for (i = 0; i < STRETCH_COUNT; ++i) pCD->clientStretchWin[i] = (Window)0L;
|
||||||
|
|
||||||
return (pCD);
|
return (pCD);
|
||||||
} /* END OF FUNCTION InitClientData */
|
} /* END OF FUNCTION InitClientData */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue