xserver/dix dispatch.c, 3.36, 3.37 events.c, 3.54, 3.55 window.c, 3.42, 3.43

Keith Packard xserver-commit at pdx.freedesktop.org
Tue Feb 8 13:51:44 PST 2005


Committed by: keithp

Update of /cvs/xserver/xserver/dix
In directory gabe:/tmp/cvs-serv14618/dix

Modified Files:
	dispatch.c events.c window.c 
Log Message:
2005-02-08  Keith Packard  <keithp at keithp.com>

	* Xext/shape.c: (SendShapeNotify):
	* dix/dispatch.c:
	* dix/events.c: (XYToWindow), (XineramaPointInWindowIsVisible):
	* dix/window.c: (FreeWindowResources):
	* xfixes/region.c: (ProcXFixesSetWindowShapeRegion):
	Add ShapeInput support


Index: dispatch.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/dispatch.c,v
retrieving revision 3.36
retrieving revision 3.37
diff -u -d -r3.36 -r3.37
--- dispatch.c	19 Apr 2004 18:21:28 -0000	3.36
+++ dispatch.c	8 Feb 2005 21:51:41 -0000	3.37
@@ -1269,6 +1269,11 @@
 		&& (!wBoundingShape(pWin) ||
 		    POINT_IN_REGION(pWin->drawable.pScreen, 
 					&pWin->borderSize, x, y, &box))
+		&& (!wInputShape(pWin) ||
+		    POINT_IN_REGION(pWin->drawable.pScreen,
+				    wInputShape(pWin), 
+				    x - pWin->drawable.x, 
+				    y - pWin->drawable.y, &box))
 		)
             {
 		rep.child = pWin->drawable.id;

Index: events.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/events.c,v
retrieving revision 3.54
retrieving revision 3.55
diff -u -d -r3.54 -r3.55
--- events.c	19 Apr 2004 18:21:28 -0000	3.54
+++ events.c	8 Feb 2005 21:51:41 -0000	3.55
@@ -1910,6 +1910,7 @@
 XYToWindow(int x, int y)
 {
     register WindowPtr  pWin;
+    BoxRec		box;
 
     spriteTraceGood = 1;	/* root window still there */
     pWin = ROOT->firstChild;
@@ -1927,6 +1928,11 @@
 		 * borderSize
 		 */
 		&& (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y))
+		&& (!wInputShape(pWin) ||
+		    POINT_IN_REGION(pWin->drawable.pScreen,
+				    wInputShape(pWin),
+				    x - pWin->drawable.x, 
+				    y - pWin->drawable.y, &box))
 		)
 	{
 	    if (spriteTraceGood >= spriteTraceSize)
@@ -2134,7 +2140,12 @@
 	x = xoff - panoramiXdataPtr[i].x;
 	y = yoff - panoramiXdataPtr[i].y;
 
-	if(POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box))
+	if(POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box)
+	   && (!wInputShape(pWin) ||
+	       POINT_IN_REGION(pWin->drawable.pScreen,
+			       wInputShape(pWin),
+			       x - pWin->drawable.x, 
+			       y - pWin->drawable.y, &box))
             return TRUE;
 
     }

Index: window.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/window.c,v
retrieving revision 3.42
retrieving revision 3.43
diff -u -d -r3.42 -r3.43
--- window.c	16 Feb 2004 03:30:07 -0000	3.42
+++ window.c	8 Feb 2005 21:51:41 -0000	3.43
@@ -428,6 +428,7 @@
     pWin->optional->backingPixel = 0;
     pWin->optional->boundingShape = NULL;
     pWin->optional->clipShape = NULL;
+    pWin->optional->inputShape = NULL;
 #ifdef XINPUT
     pWin->optional->inputMasks = NULL;
 #endif
@@ -827,6 +828,8 @@
 	REGION_DESTROY(pScreen, wBoundingShape (pWin));
     if (wClipShape (pWin))
 	REGION_DESTROY(pScreen, wClipShape (pWin));
+    if (wInputShape (pWin))
+	REGION_DESTROY(pScreen, wInputShape (pWin));
     if (pWin->borderIsPixel == FALSE)
 	(*pScreen->DestroyPixmap)(pWin->border.pixmap);
     if (pWin->backgroundState == BackgroundPixmap)
@@ -3212,7 +3215,12 @@
     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);
 }
@@ -3617,6 +3625,8 @@
 	return;
     if (optional->clipShape != NULL)
 	return;
+    if (optional->inputShape != NULL)
+	return;
 #ifdef XINPUT
     if (optional->inputMasks != NULL)
 	return;
@@ -3661,6 +3671,7 @@
     optional->backingPixel = 0;
     optional->boundingShape = NULL;
     optional->clipShape = NULL;
+    optional->inputShape = NULL;
 #ifdef XINPUT
     optional->inputMasks = NULL;
 #endif



More information about the xserver-commit mailing list