1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

dtwm: Support multi-monitor fullscreen.

This commit is contained in:
Liang Chang 2021-08-07 15:09:28 +08:00
parent 6a28507dbc
commit 78c8241738

View file

@ -181,6 +181,7 @@ void SetClientStateWithEventMask (ClientData *pCD, int newState, Time setTime, u
* WM_STATE property is set in WithdrawWindow.
*/
XDeleteProperty (DISPLAY, pCD->client, wmGD.xa_NET_WM_STATE);
UnManageWindow (pCD);
break;
}
@ -616,17 +617,29 @@ void ConfigureNewState (ClientData *pcd)
}
else
{
/*
* Update client config to reflect underlying head, if MultiHead is active
*/
if (WmHI = GetHeadInfo(pcd)) {
FrameToClient(pcd, &WmHI->x_org, &WmHI->y_org,
&WmHI->width, &WmHI->height);
pcd->maxX = WmHI->x_org;
pcd->maxY = WmHI->y_org;
pcd->maxWidth = WmHI->width;
pcd->maxHeight = WmHI->height;
}
if (pcd->isFullscreen && pcd->monitorSizeIsSet)
{
pcd->maxX = pcd->monitorX;
pcd->maxY = pcd->monitorY;
pcd->maxWidth = pcd->monitorWidth;
pcd->maxHeight = pcd->monitorHeight;
FrameToClient(pcd, &pcd->maxX, &pcd->maxY, &pcd->maxWidth,
&pcd->maxHeight);
}
else if (WmHI = GetHeadInfo(pcd)) {
/*
* Update client config to reflect underlying head, if MultiHead is
* active
*/
FrameToClient(pcd, &WmHI->x_org, &WmHI->y_org,
&WmHI->width, &WmHI->height);
pcd->maxX = WmHI->x_org;
pcd->maxY = WmHI->y_org;
pcd->maxWidth = WmHI->width;
pcd->maxHeight = WmHI->height;
free(WmHI);
}
XResizeWindow (DISPLAY, pcd->client,
(unsigned int) pcd->maxWidth,