aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winmultiwindowshape.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winmultiwindowshape.c')
-rw-r--r--xorg-server/hw/xwin/winmultiwindowshape.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowshape.c b/xorg-server/hw/xwin/winmultiwindowshape.c
index 44007027a..32a3f16e6 100644
--- a/xorg-server/hw/xwin/winmultiwindowshape.c
+++ b/xorg-server/hw/xwin/winmultiwindowshape.c
@@ -46,9 +46,7 @@ winSetShapeMultiWindow (WindowPtr pWin)
ScreenPtr pScreen = pWin->drawable.pScreen;
winScreenPriv(pScreen);
-#if CYGMULTIWINDOW_DEBUG
- ErrorF ("winSetShapeMultiWindow - pWin: %08x\n", pWin);
-#endif
+ winDebug ("winSetShapeMultiWindow - pWin: %08x\n", pWin);
WIN_UNWRAP(SetShape);
(*pScreen->SetShape)(pWin);
@@ -71,6 +69,9 @@ winUpdateRgnMultiWindow (WindowPtr pWin)
{
SetWindowRgn (winGetWindowPriv(pWin)->hWnd,
winGetWindowPriv(pWin)->hRgn, TRUE);
+
+ /* The system now owns the region specified by the region handle and will delete it when it is no longer needed. */
+ winGetWindowPriv(pWin)->hRgn = NULL;
}
@@ -87,9 +88,7 @@ winReshapeMultiWindow (WindowPtr pWin)
HRGN hRgn, hRgnRect;
winWindowPriv(pWin);
-#if CYGDEBUG
winDebug ("winReshape ()\n");
-#endif
/* Bail if the window is the root window */
if (pWin->parent == NULL)
@@ -206,3 +205,14 @@ winReshapeMultiWindow (WindowPtr pWin)
return;
}
+
+void
+winShapeRgnUpdateMultiwindow(HWND hwnd)
+{
+ WindowPtr pWin = GetProp (hwnd, WIN_WINDOW_PROP);
+ if (pWin)
+ {
+ winReshapeMultiWindow(pWin);
+ winUpdateRgnMultiWindow(pWin);
+ }
+}