xserver/xfixes region.c, 1.6, 1.7 xfixes.c, 1.5, 1.6 xfixesint.h, 1.5, 1.6

Keith Packard xserver-commit at pdx.freedesktop.org
Mon Jul 26 10:14:30 PDT 2004


Committed by: keithp

Update of /cvs/xserver/xserver/xfixes
In directory pdx:/tmp/cvs-serv2204/xfixes

Modified Files:
	region.c xfixes.c xfixesint.h 
Log Message:
2004-07-26  Keith Packard  <keithp at keithp.com>

	* hw/kdrive/fbdev/fbdev.c: (fbdevModeSupported),
	(fbdevScreenInitialize):
	Eliminate bogus rate check in fbdevModeSupported.
	Hmm.  Potentially bogus rate selection necessary for Mac fbdev

	* hw/kdrive/src/kaa.c: (kaaPixmapSave):
	Don't know about fb changes to pixmaps, so can't track dirt.

	* hw/kdrive/src/kmode.c: (KdFindMode):
	Add Mac specific 1280x854 mode.
	Warn when requested mode isn't found.
	
	* hw/kdrive/vesa/vbe.c: (VbeBoot), (VbeDoInterruptE6):
	* hw/kdrive/vesa/vbe.h:
	* hw/kdrive/vesa/vesa.c: (vesaInitialize), (vesaUseMsg),
	(vesaProcessArgument):
	* hw/kdrive/vesa/vm86.c: (Vm86DoInterrupt), (Vm86DoPOST):
	* hw/kdrive/vesa/vm86.h:
	Add ability to soft-boot video cards.

	* xfixes/region.c: (ProcXFixesExpandRegion),
	(SProcXFixesExpandRegion):
	* xfixes/xfixes.c: (XFixesNumberRequests):
	* xfixes/xfixesint.h:
	Add region expand request.  FIXME: need test cases


Index: region.c
===================================================================
RCS file: /cvs/xserver/xserver/xfixes/region.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- region.c	12 Feb 2004 18:58:49 -0000	1.6
+++ region.c	26 Jul 2004 17:14:27 -0000	1.7
@@ -778,3 +778,63 @@
     swaps (&stuff->yOrigin, n);
     return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
 }
+
+int
+ProcXFixesExpandRegion (ClientPtr client)
+{
+    RegionPtr	pSource, pDestination;
+    int		ret = Success;
+    REQUEST (xXFixesExpandRegionReq);
+    BoxPtr	pTmp;
+    BoxPtr	pSrc;
+    int		nBoxes;
+    int		i;
+
+    REQUEST_SIZE_MATCH (xXFixesExpandRegionReq);
+    VERIFY_REGION(pSource, stuff->source, client, SecurityReadAccess);
+    VERIFY_REGION(pDestination, stuff->destination, client, SecurityWriteAccess);
+    
+    nBoxes = REGION_NUM_RECTS(pSource);
+    pSrc = REGION_RECTS(pSource);
+    if (nBoxes)
+    {
+	pTmp = xalloc (nBoxes * sizeof (BoxRec));
+	if (!pTmp)
+	    return BadAlloc;
+	for (i = 0; i < nBoxes; i++)
+	{
+	    pTmp[i].x1 = pSrc[i].x1 - stuff->left;
+	    pTmp[i].x2 = pSrc[i].x2 + stuff->right;
+	    pTmp[i].y1 = pSrc[i].y1 - stuff->top;
+	    pTmp[i].y2 = pSrc[i].y2 + stuff->bottom;
+	}
+	REGION_EMPTY (pScreen, pDestination);
+	for (i = 0; i < nBoxes; i++)
+	{
+	    RegionRec	r;
+	    REGION_INIT (pScreen, &r, &pTmp[i], 0);
+	    REGION_UNION (pScreen, pDestination, pDestination, &r);
+	}
+    }
+    if (ret == Success) 
+	ret = client->noClientException;
+    return ret;
+}
+
+int
+SProcXFixesExpandRegion (ClientPtr client)
+{
+    int n;
+    REQUEST (xXFixesExpandRegionReq);
+
+    swaps (&stuff->length, n);
+    REQUEST_SIZE_MATCH (xXFixesExpandRegionReq);
+    swapl (&stuff->source, n);
+    swapl (&stuff->destination, n);
+    swaps (&stuff->left, n);
+    swaps (&stuff->right, n);
+    swaps (&stuff->top, n);
+    swaps (&stuff->bottom, n);
+    return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
+}
+

Index: xfixes.c
===================================================================
RCS file: /cvs/xserver/xserver/xfixes/xfixes.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- xfixes.c	22 Nov 2003 00:49:11 -0000	1.5
+++ xfixes.c	26 Jul 2004 17:14:27 -0000	1.6
@@ -72,6 +72,7 @@
     X_XFixesQueryVersion,	/* before client sends QueryVersion */
     X_XFixesGetCursorImage,	/* Version 1 */
     X_XFixesChangeCursorByName,	/* Version 2 */
+    X_XFixesExpandRegion,	/* Version 3 */
 };
 
 #define NUM_VERSION_REQUESTS	(sizeof (version_requests) / sizeof (version_requests[0]))
@@ -107,6 +108,8 @@
     ProcXFixesGetCursorImageAndName,
     ProcXFixesChangeCursor,
     ProcXFixesChangeCursorByName,
+/*************** Version 3 ******************/
+    ProcXFixesExpandRegion,
 };
 
 static int
@@ -165,6 +168,8 @@
     SProcXFixesGetCursorImageAndName,
     SProcXFixesChangeCursor,
     SProcXFixesChangeCursorByName,
+/*************** Version 3 ******************/
+    SProcXFixesExpandRegion,
 };
 
 static int

Index: xfixesint.h
===================================================================
RCS file: /cvs/xserver/xserver/xfixes/xfixesint.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- xfixesint.h	22 Nov 2003 00:49:11 -0000	1.5
+++ xfixesint.h	26 Jul 2004 17:14:27 -0000	1.6
@@ -237,4 +237,10 @@
 int
 SProcXFixesSetPictureClipRegion (ClientPtr client);
 
+int
+ProcXFixesExpandRegion (ClientPtr client);
+
+int
+SProcXFixesExpandRegion (ClientPtr client);
+
 #endif /* _XFIXESINT_H_ */



More information about the xserver-commit mailing list