summaryrefslogtreecommitdiff
path: root/dix/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'dix/window.c')
-rw-r--r--dix/window.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/dix/window.c b/dix/window.c
index 27d3d05ec..ac6f775ba 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -414,6 +414,7 @@ CreateRootWindow(ScreenPtr pScreen)
#ifdef SHAPE
pWin->optional->boundingShape = NULL;
pWin->optional->clipShape = NULL;
+ pWin->optional->inputShape = NULL;
#endif
#ifdef XINPUT
pWin->optional->inputMasks = NULL;
@@ -800,6 +801,8 @@ FreeWindowResources(register WindowPtr pWin)
REGION_DESTROY(pScreen, wBoundingShape (pWin));
if (wClipShape (pWin))
REGION_DESTROY(pScreen, wClipShape (pWin));
+ if (wInputShape (pWin))
+ REGION_DESTROY(pScreen, wInputShape (pWin));
#endif
if (pWin->borderIsPixel == FALSE)
(*pScreen->DestroyPixmap)(pWin->border.pixmap);
@@ -3182,7 +3185,12 @@ PointInWindowIsVisible(register WindowPtr pWin, int x, int y)
if (!pWin->realized)
return (FALSE);
if (POINT_IN_REGION(pWin->drawable.pScreen, &pWin->borderClip,
- x, y, &box))
+ x, y, &box)
+ && (!wInputShape(pWin) ||
+ POINT_IN_REGION(pWin->drawable.pScreen,
+ wInputShape(pWin),
+ x - pWin->drawable.x,
+ y - pWin->drawable.y, &box)))
return(TRUE);
return(FALSE);
}
@@ -3558,6 +3566,8 @@ CheckWindowOptionalNeed (register WindowPtr w)
return;
if (optional->clipShape != NULL)
return;
+ if (optional->inputShape != NULL)
+ return;
#endif
#ifdef XINPUT
if (optional->inputMasks != NULL)
@@ -3603,6 +3613,7 @@ MakeWindowOptional (register WindowPtr pWin)
#ifdef SHAPE
optional->boundingShape = NULL;
optional->clipShape = NULL;
+ optional->inputShape = NULL;
#endif
#ifdef XINPUT
optional->inputMasks = NULL;