diff options
author | Adam Jackson <ajax@nwnk.net> | 2005-06-10 04:01:14 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2005-06-10 04:01:14 +0000 |
commit | 988ffddfe082fb27fadf9aa60ab22dce6855508c (patch) | |
tree | 59390df386beab4f68b7e6ee98aba6f81f006b70 /dix/window.c | |
parent | d24ed90547122832d4168ad761f68e107bb1a2db (diff) |
Bug #2799: Input shape. (Keith Packard)XORG-6_8_99_11
Diffstat (limited to 'dix/window.c')
-rw-r--r-- | dix/window.c | 13 |
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; |