[Xorg-commit] xc/programs/Xserver/hw/xwin winwin32rootless.c,1.1.2.3,1.1.2.4 winwindowswm.c,1.1.2.2,1.1.2.3
Kensuke Matsuzaki
xorg-commit at pdx.freedesktop.org
Tue Jan 6 02:40:32 EET 2004
Committed by: zakki
Update of /cvs/xorg/xc/programs/Xserver/hw/xwin
In directory pdx:/tmp/cvs-serv1379
Modified Files:
Tag: CYGWIN
winwin32rootless.c winwindowswm.c
Log Message:
Add shape extnsion for multi-window window manager.
Index: winwin32rootless.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/Attic/winwin32rootless.c,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -d -r1.1.2.3 -r1.1.2.4
--- winwin32rootless.c 21 Dec 2003 07:26:10 -0000 1.1.2.3
+++ winwin32rootless.c 6 Jan 2004 00:40:30 -0000 1.1.2.4
@@ -540,12 +540,32 @@
winWin32RootlessReshapeFrame (RootlessFrameID wid, RegionPtr pShape)
{
win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) wid;
- HRGN hRgn;
+ HRGN hRgn, hRgnWindow, hRgnClient;
+ RECT rcWindow, rcClient;
+ POINT ptOffset;
#if CYGMULTIWINDOW_DEBUG
ErrorF ("winWin32RootlessReshapeFrame (%08x)\n", (int) pRLWinPriv);
#endif
+
hRgn = winWin32RootlessCreateRgnFromRegion (pShape);
+
+ /* Create region for non-client area */
+ GetWindowRect (pRLWinPriv->hWnd, &rcWindow);
+ GetClientRect (pRLWinPriv->hWnd, &rcClient);
+ MapWindowPoints (pRLWinPriv->hWnd, HWND_DESKTOP, (LPPOINT)&rcClient, 2);
+ OffsetRgn (hRgn, rcClient.left - rcWindow.left, rcClient.top - rcWindow.top);
+ OffsetRect (&rcClient, -rcWindow.left, -rcWindow.top);
+ OffsetRect (&rcWindow, -rcWindow.left, -rcWindow.top);
+ hRgnWindow = CreateRectRgnIndirect (&rcWindow);
+ hRgnClient = CreateRectRgnIndirect (&rcClient);
+ CombineRgn (hRgnWindow, hRgnWindow, hRgnClient, RGN_DIFF);
+ CombineRgn (hRgn, hRgnWindow, hRgn, RGN_OR);
+
+
SetWindowRgn (pRLWinPriv->hWnd, hRgn, TRUE);
+
+ DeleteObject (hRgnWindow);
+ DeleteObject (hRgnClient);
}
void
Index: winwindowswm.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/Attic/winwindowswm.c,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -d -r1.1.2.2 -r1.1.2.3
--- winwindowswm.c 18 Dec 2003 01:32:03 -0000 1.1.2.2
+++ winwindowswm.c 6 Jan 2004 00:40:30 -0000 1.1.2.3
@@ -440,6 +440,8 @@
win32RootlessWindowPtr pRLWinPriv;
RECT rcNew;
WINDOWPLACEMENT wndpl;
+ RegionRec newShape;
+ ScreenPtr pScreen;
REQUEST_SIZE_MATCH (xWindowsWMFrameDrawReq);
@@ -506,6 +508,18 @@
winWin32RootlessUpdateIcon (pWin->drawable.id);
+ if (wBoundingShape(pWin) != NULL)
+ {
+ pScreen = pWin->drawable.pScreen;
+ /* wBoundingShape is relative to *inner* origin of window.
+ Translate by borderWidth to get the outside-relative position. */
+
+ REGION_NULL(pScreen, &newShape);
+ REGION_COPY(pScreen, &newShape, wBoundingShape(pWin));
+ REGION_TRANSLATE(pScreen, &newShape, pWin->borderWidth, pWin->borderWidth);
+ winWin32RootlessReshapeFrame (pRLWinPriv, &newShape);
+ REGION_UNINIT(pScreen, &newShape);
+ }
#if CYGMULTIWINDOW_DEBUG
ErrorF ("ProcWindowsWMFrameDraw - done\n");
#endif
More information about the xorg-commit
mailing list