mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 04:40:02 +01:00
Revert "Xext: shape: clean up Xinerama dispatch"
This reverts commit a57db845bb.
It breaks when building with -Dxinerama=false:
../Xext/shape.c: In function ‘ProcShapeRectangles’:
../Xext/shape.c:318:12: error: too few arguments to function
‘ShapeRectangles’; expected 2, have 1
318 | return ShapeRectangles(client);
| ^~~~~~~~~~~~~~~
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2055>
This commit is contained in:
parent
e6ec0bfde8
commit
dcd1ffa0c2
1 changed files with 80 additions and 51 deletions
131
Xext/shape.c
131
Xext/shape.c
|
|
@ -225,16 +225,24 @@ ProcShapeQueryVersion(ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************
|
||||||
|
* ProcShapeRectangles
|
||||||
|
*
|
||||||
|
*****************/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ShapeRectangles(ClientPtr client, xShapeRectanglesReq *stuff)
|
ProcShapeRectangles(ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
|
||||||
|
REQUEST(xShapeRectanglesReq);
|
||||||
xRectangle *prects;
|
xRectangle *prects;
|
||||||
int nrects, ctype, rc;
|
int nrects, ctype, rc;
|
||||||
RegionPtr srcRgn;
|
RegionPtr srcRgn;
|
||||||
RegionPtr *destRgn;
|
RegionPtr *destRgn;
|
||||||
CreateDftPtr createDefault;
|
CreateDftPtr createDefault;
|
||||||
|
|
||||||
|
REQUEST_AT_LEAST_SIZE(xShapeRectanglesReq);
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess);
|
rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
|
@ -289,19 +297,16 @@ ShapeRectangles(ClientPtr client, xShapeRectanglesReq *stuff)
|
||||||
stuff->xOff, stuff->yOff, createDefault);
|
stuff->xOff, stuff->yOff, createDefault);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
static int
|
static int
|
||||||
ProcShapeRectangles(ClientPtr client)
|
ProcPanoramiXShapeRectangles(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShapeRectanglesReq);
|
REQUEST(xShapeRectanglesReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xShapeRectanglesReq);
|
|
||||||
|
|
||||||
#ifdef XINERAMA
|
|
||||||
if (noPanoramiXExtension)
|
|
||||||
return ShapeRectangles(client, stuff);
|
|
||||||
|
|
||||||
PanoramiXRes *win;
|
PanoramiXRes *win;
|
||||||
int j, result;
|
int j, result;
|
||||||
|
|
||||||
|
REQUEST_AT_LEAST_SIZE(xShapeRectanglesReq);
|
||||||
|
|
||||||
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
||||||
client, DixWriteAccess);
|
client, DixWriteAccess);
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
|
|
@ -309,27 +314,32 @@ ProcShapeRectangles(ClientPtr client)
|
||||||
|
|
||||||
FOR_NSCREENS(j) {
|
FOR_NSCREENS(j) {
|
||||||
stuff->dest = win->info[j].id;
|
stuff->dest = win->info[j].id;
|
||||||
result = ShapeRectangles(client, stuff);
|
result = ProcShapeRectangles(client);
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
#else
|
|
||||||
return ShapeRectangles(client);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif /* XINERAMA */
|
||||||
|
|
||||||
|
/**************
|
||||||
|
* ProcShapeMask
|
||||||
|
**************/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ShapeMask(ClientPtr client, xShapeMaskReq *stuff)
|
ProcShapeMask(ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
ScreenPtr pScreen;
|
ScreenPtr pScreen;
|
||||||
|
|
||||||
|
REQUEST(xShapeMaskReq);
|
||||||
RegionPtr srcRgn;
|
RegionPtr srcRgn;
|
||||||
RegionPtr *destRgn;
|
RegionPtr *destRgn;
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
CreateDftPtr createDefault;
|
CreateDftPtr createDefault;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
REQUEST_SIZE_MATCH(xShapeMaskReq);
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess);
|
rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
|
@ -385,19 +395,16 @@ ShapeMask(ClientPtr client, xShapeMaskReq *stuff)
|
||||||
stuff->xOff, stuff->yOff, createDefault);
|
stuff->xOff, stuff->yOff, createDefault);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
static int
|
static int
|
||||||
ProcShapeMask(ClientPtr client)
|
ProcPanoramiXShapeMask(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShapeMaskReq);
|
REQUEST(xShapeMaskReq);
|
||||||
REQUEST_SIZE_MATCH(xShapeMaskReq);
|
|
||||||
|
|
||||||
#ifdef XINERAMA
|
|
||||||
if (noPanoramiXExtension)
|
|
||||||
return ShapeMask(client, stuff);
|
|
||||||
|
|
||||||
PanoramiXRes *win, *pmap;
|
PanoramiXRes *win, *pmap;
|
||||||
int j, result;
|
int j, result;
|
||||||
|
|
||||||
|
REQUEST_SIZE_MATCH(xShapeMaskReq);
|
||||||
|
|
||||||
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
||||||
client, DixWriteAccess);
|
client, DixWriteAccess);
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
|
|
@ -416,20 +423,24 @@ ProcShapeMask(ClientPtr client)
|
||||||
stuff->dest = win->info[j].id;
|
stuff->dest = win->info[j].id;
|
||||||
if (pmap)
|
if (pmap)
|
||||||
stuff->src = pmap->info[j].id;
|
stuff->src = pmap->info[j].id;
|
||||||
result = ShapeMask(client, stuff);
|
result = ProcShapeMask(client);
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
#else
|
|
||||||
return ShapeMask(client, stuff);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif /* XINERAMA */
|
||||||
|
|
||||||
|
/************
|
||||||
|
* ProcShapeCombine
|
||||||
|
************/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ShapeCombine(ClientPtr client, xShapeCombineReq *stuff)
|
ProcShapeCombine(ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pSrcWin, pDestWin;
|
WindowPtr pSrcWin, pDestWin;
|
||||||
|
|
||||||
|
REQUEST(xShapeCombineReq);
|
||||||
RegionPtr srcRgn;
|
RegionPtr srcRgn;
|
||||||
RegionPtr *destRgn;
|
RegionPtr *destRgn;
|
||||||
CreateDftPtr createDefault;
|
CreateDftPtr createDefault;
|
||||||
|
|
@ -437,6 +448,7 @@ ShapeCombine(ClientPtr client, xShapeCombineReq *stuff)
|
||||||
RegionPtr tmp;
|
RegionPtr tmp;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
REQUEST_SIZE_MATCH(xShapeCombineReq);
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
rc = dixLookupWindow(&pDestWin, stuff->dest, client, DixSetAttrAccess);
|
rc = dixLookupWindow(&pDestWin, stuff->dest, client, DixSetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
|
@ -511,19 +523,16 @@ ShapeCombine(ClientPtr client, xShapeCombineReq *stuff)
|
||||||
stuff->xOff, stuff->yOff, createDefault);
|
stuff->xOff, stuff->yOff, createDefault);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
static int
|
static int
|
||||||
ProcShapeCombine(ClientPtr client)
|
ProcPanoramiXShapeCombine(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShapeCombineReq);
|
REQUEST(xShapeCombineReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xShapeCombineReq);
|
|
||||||
|
|
||||||
#ifdef XINERAMA
|
|
||||||
if (noPanoramiXExtension)
|
|
||||||
return ShapeCombine(client, stuff);
|
|
||||||
|
|
||||||
PanoramiXRes *win, *win2;
|
PanoramiXRes *win, *win2;
|
||||||
int j, result;
|
int j, result;
|
||||||
|
|
||||||
|
REQUEST_AT_LEAST_SIZE(xShapeCombineReq);
|
||||||
|
|
||||||
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
||||||
client, DixWriteAccess);
|
client, DixWriteAccess);
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
|
|
@ -537,23 +546,28 @@ ProcShapeCombine(ClientPtr client)
|
||||||
FOR_NSCREENS(j) {
|
FOR_NSCREENS(j) {
|
||||||
stuff->dest = win->info[j].id;
|
stuff->dest = win->info[j].id;
|
||||||
stuff->src = win2->info[j].id;
|
stuff->src = win2->info[j].id;
|
||||||
result = ShapeCombine(client, stuff);
|
result = ProcShapeCombine(client);
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
#else
|
|
||||||
return ShapeCombine(client, stuff);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif /* XINERAMA */
|
||||||
|
|
||||||
|
/*************
|
||||||
|
* ProcShapeOffset
|
||||||
|
*************/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ShapeOffset(ClientPtr client, xShapeOffsetReq *stuff)
|
ProcShapeOffset(ClientPtr client)
|
||||||
{
|
{
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
|
|
||||||
|
REQUEST(xShapeOffsetReq);
|
||||||
RegionPtr srcRgn;
|
RegionPtr srcRgn;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
REQUEST_SIZE_MATCH(xShapeOffsetReq);
|
||||||
UpdateCurrentTime();
|
UpdateCurrentTime();
|
||||||
rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess);
|
rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
|
@ -580,18 +594,15 @@ ShapeOffset(ClientPtr client, xShapeOffsetReq *stuff)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef XINERAMA
|
||||||
static int
|
static int
|
||||||
ProcShapeOffset(ClientPtr client)
|
ProcPanoramiXShapeOffset(ClientPtr client)
|
||||||
{
|
{
|
||||||
REQUEST(xShapeOffsetReq);
|
REQUEST(xShapeOffsetReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xShapeOffsetReq);
|
|
||||||
|
|
||||||
#ifdef XINERAMA
|
|
||||||
PanoramiXRes *win;
|
PanoramiXRes *win;
|
||||||
int j, result;
|
int j, result;
|
||||||
|
|
||||||
if (noPanoramiXExtension)
|
REQUEST_AT_LEAST_SIZE(xShapeOffsetReq);
|
||||||
return ShapeOffset(client, stuff);
|
|
||||||
|
|
||||||
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW,
|
||||||
client, DixWriteAccess);
|
client, DixWriteAccess);
|
||||||
|
|
@ -600,15 +611,13 @@ ProcShapeOffset(ClientPtr client)
|
||||||
|
|
||||||
FOR_NSCREENS(j) {
|
FOR_NSCREENS(j) {
|
||||||
stuff->dest = win->info[j].id;
|
stuff->dest = win->info[j].id;
|
||||||
result = ShapeOffset(client, stuff);
|
result = ProcShapeOffset(client);
|
||||||
if (result != Success)
|
if (result != Success)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
#else
|
|
||||||
return ShapeOffset(client, stuff);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif /* XINERAMA */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ProcShapeQueryExtents(ClientPtr client)
|
ProcShapeQueryExtents(ClientPtr client)
|
||||||
|
|
@ -1026,13 +1035,33 @@ ProcShapeDispatch(ClientPtr client)
|
||||||
case X_ShapeQueryVersion:
|
case X_ShapeQueryVersion:
|
||||||
return ProcShapeQueryVersion(client);
|
return ProcShapeQueryVersion(client);
|
||||||
case X_ShapeRectangles:
|
case X_ShapeRectangles:
|
||||||
return ProcShapeRectangles(client);
|
#ifdef XINERAMA
|
||||||
|
if (!noPanoramiXExtension)
|
||||||
|
return ProcPanoramiXShapeRectangles(client);
|
||||||
|
else
|
||||||
|
#endif /* XINERAMA */
|
||||||
|
return ProcShapeRectangles(client);
|
||||||
case X_ShapeMask:
|
case X_ShapeMask:
|
||||||
return ProcShapeMask(client);
|
#ifdef XINERAMA
|
||||||
|
if (!noPanoramiXExtension)
|
||||||
|
return ProcPanoramiXShapeMask(client);
|
||||||
|
else
|
||||||
|
#endif /* XINERAMA */
|
||||||
|
return ProcShapeMask(client);
|
||||||
case X_ShapeCombine:
|
case X_ShapeCombine:
|
||||||
return ProcShapeCombine(client);
|
#ifdef XINERAMA
|
||||||
|
if (!noPanoramiXExtension)
|
||||||
|
return ProcPanoramiXShapeCombine(client);
|
||||||
|
else
|
||||||
|
#endif /* XINERAMA */
|
||||||
|
return ProcShapeCombine(client);
|
||||||
case X_ShapeOffset:
|
case X_ShapeOffset:
|
||||||
return ProcShapeOffset(client);
|
#ifdef XINERAMA
|
||||||
|
if (!noPanoramiXExtension)
|
||||||
|
return ProcPanoramiXShapeOffset(client);
|
||||||
|
else
|
||||||
|
#endif /* XINERAMA */
|
||||||
|
return ProcShapeOffset(client);
|
||||||
case X_ShapeQueryExtents:
|
case X_ShapeQueryExtents:
|
||||||
return ProcShapeQueryExtents(client);
|
return ProcShapeQueryExtents(client);
|
||||||
case X_ShapeSelectInput:
|
case X_ShapeSelectInput:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue