mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
Xinerama: lambda-esque macro for walking Xinerama screens
Move the walking loops on Xinerama screens into lambda-esque macros: the callers look quite like we've been using lambda functions and closures, but actually are just fancy macro trickery. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
e3d9f4c3ef
commit
eb17b34362
24
Xext/shape.c
24
Xext/shape.c
@@ -311,13 +311,13 @@ ProcShapeRectangles(ClientPtr client)
|
||||
if (result != Success)
|
||||
return result;
|
||||
|
||||
int walkScreenIdx;
|
||||
FOR_NSCREENS_BACKWARD(walkScreenIdx) {
|
||||
XINERAMA_FOR_EACH_SCREEN_BACKWARD({
|
||||
stuff->dest = win->info[walkScreenIdx].id;
|
||||
result = ShapeRectangles(client, stuff);
|
||||
if (result != Success)
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
#else
|
||||
return ShapeRectangles(client, stuff);
|
||||
@@ -425,15 +425,15 @@ ProcShapeMask(ClientPtr client)
|
||||
else
|
||||
pmap = NULL;
|
||||
|
||||
int walkScreenIdx;
|
||||
FOR_NSCREENS_BACKWARD(walkScreenIdx) {
|
||||
XINERAMA_FOR_EACH_SCREEN_BACKWARD({
|
||||
stuff->dest = win->info[walkScreenIdx].id;
|
||||
if (pmap)
|
||||
stuff->src = pmap->info[walkScreenIdx].id;
|
||||
result = ShapeMask(client, stuff);
|
||||
if (result != Success)
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
#else
|
||||
return ShapeMask(client, stuff);
|
||||
@@ -557,14 +557,14 @@ ProcShapeCombine(ClientPtr client)
|
||||
if (result != Success)
|
||||
return result;
|
||||
|
||||
int walkScreenIdx;
|
||||
FOR_NSCREENS_BACKWARD(walkScreenIdx) {
|
||||
XINERAMA_FOR_EACH_SCREEN_BACKWARD({
|
||||
stuff->dest = win->info[walkScreenIdx].id;
|
||||
stuff->src = win2->info[walkScreenIdx].id;
|
||||
result = ShapeCombine(client, stuff);
|
||||
if (result != Success)
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
#else
|
||||
return ShapeCombine(client, stuff);
|
||||
@@ -628,13 +628,13 @@ ProcShapeOffset(ClientPtr client)
|
||||
if (result != Success)
|
||||
return result;
|
||||
|
||||
int walkScreenIdx;
|
||||
FOR_NSCREENS_BACKWARD(walkScreenIdx) {
|
||||
XINERAMA_FOR_EACH_SCREEN_BACKWARD({
|
||||
stuff->dest = win->info[walkScreenIdx].id;
|
||||
result = ShapeOffset(client, stuff);
|
||||
if (result != Success)
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
#else
|
||||
return ShapeOffset(client, stuff);
|
||||
|
||||
Reference in New Issue
Block a user