aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-03-16 11:11:43 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-05-02 14:53:06 +0200
commit63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4 (patch)
tree3d67994a85c5d8c3a929ab315fbcb617baa6423d /nx-X11/programs/Xserver/hw/nxagent/NXevents.c
parent28ba877803d8383eac282b873b8e0bb50c8db46b (diff)
downloadnx-libs-63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4.tar.gz
nx-libs-63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4.tar.bz2
nx-libs-63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4.zip
Rename region macros to eliminate screen argument
This is a huge mechanical patch and a few small fixups required to finish the job. They were reviewed separately, but because the server does not build without both pieces, I've merged them together at this time. The mechanical changes were performed by running the included 'fix-region' script over the whole nx-X11/programs/Xserver tree: $ cd nx-X11/programs/Xserver && ( git ls-files | grep -v '^fix-' | xargs ./fix-region; ) And then, the white space errors in the resulting patch were fixed using the provided fix-patch-whitespace script. $ sh ./fix-patch-whitespace Thanks to Jamey Sharp for the mighty fine sed-generating sed script. v1: Keith Packard <keithp@keithp.com> (X.Org xserver commit: 2dc138922b7588515d5f2447e4b9dcdc0bef15e0) v2: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> (apply fix-region script to nx-libs)
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXevents.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXevents.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
index 11ff62947..117203103 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
@@ -379,14 +379,14 @@ XineramaSetCursorPosition(
x += panoramiXdataPtr[0].x;
y += panoramiXdataPtr[0].y;
- if(!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum],
+ if(!RegionContainsPoint(&XineramaScreenRegions[pScreen->myNum],
x, y, &box))
{
FOR_NSCREENS(i)
{
if(i == pScreen->myNum)
continue;
- if(POINT_IN_REGION(pScreen, &XineramaScreenRegions[i], x, y, &box))
+ if(RegionContainsPoint(&XineramaScreenRegions[i], x, y, &box))
{
pScreen = screenInfo.screens[i];
break;
@@ -516,7 +516,7 @@ XineramaCheckVirtualMotion(
i = PanoramiXNumScreens - 1;
- REGION_COPY(sprite.screen, &sprite.Reg2,
+ RegionCopy(&sprite.Reg2,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
@@ -526,16 +526,16 @@ XineramaCheckVirtualMotion(
y = off_y - panoramiXdataPtr[i].y;
if(x || y)
- REGION_TRANSLATE(sprite.screen, &sprite.Reg2, x, y);
+ RegionTranslate(&sprite.Reg2, x, y);
- REGION_UNION(sprite.screen, &sprite.Reg2, &sprite.Reg2,
+ RegionUnion(&sprite.Reg2, &sprite.Reg2,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
}
- lims = *REGION_EXTENTS(sprite.screen, &sprite.Reg2);
+ lims = *RegionExtents(&sprite.Reg2);
if (sprite.hot.x < lims.x1)
#ifdef XEVIE
@@ -558,7 +558,7 @@ XineramaCheckVirtualMotion(
#endif
sprite.hot.y = lims.y2 - 1;
- if (REGION_NUM_RECTS(&sprite.Reg2) > 1)
+ if (RegionNumRects(&sprite.Reg2) > 1)
ConfineToShape(&sprite.Reg2, &sprite.hot.x, &sprite.hot.y);
if (qe)
@@ -665,7 +665,7 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents)
i = PanoramiXNumScreens - 1;
- REGION_COPY(sprite.screen, &sprite.Reg1,
+ RegionCopy(&sprite.Reg1,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
@@ -675,18 +675,18 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents)
y = off_y - panoramiXdataPtr[i].y;
if(x || y)
- REGION_TRANSLATE(sprite.screen, &sprite.Reg1, x, y);
+ RegionTranslate(&sprite.Reg1, x, y);
- REGION_UNION(sprite.screen, &sprite.Reg1, &sprite.Reg1,
+ RegionUnion(&sprite.Reg1, &sprite.Reg1,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
}
- sprite.hotLimits = *REGION_EXTENTS(sprite.screen, &sprite.Reg1);
+ sprite.hotLimits = *RegionExtents(&sprite.Reg1);
- if(REGION_NUM_RECTS(&sprite.Reg1) > 1)
+ if(RegionNumRects(&sprite.Reg1) > 1)
sprite.hotShape = &sprite.Reg1;
else
sprite.hotShape = NullRegion;
@@ -765,9 +765,9 @@ ConfineToShape(RegionPtr shape, int *px, int *py)
int x = *px, y = *py;
int incx = 1, incy = 1;
- if (POINT_IN_REGION(sprite.hot.pScreen, shape, x, y, &box))
+ if (RegionContainsPoint(shape, x, y, &box))
return;
- box = *REGION_EXTENTS(sprite.hot.pScreen, shape);
+ box = *RegionExtents(shape);
/* this is rather crude */
do {
x += incx;
@@ -789,7 +789,7 @@ ConfineToShape(RegionPtr shape, int *px, int *py)
else if (y < box.y1)
return; /* should never get here! */
}
- } while (!POINT_IN_REGION(sprite.hot.pScreen, shape, x, y, &box));
+ } while (!RegionContainsPoint(shape, x, y, &box));
*px = x;
*py = y;
}
@@ -877,7 +877,7 @@ CheckVirtualMotion(
#endif
sprite.hot.x = sprite.hot.y = 0;
}
- lims = *REGION_EXTENTS(pWin->drawable.pScreen, &pWin->borderSize);
+ lims = *RegionExtents(&pWin->borderSize);
if (sprite.hot.x < lims.x1)
#ifdef XEVIE
xeviehot.x =
@@ -931,7 +931,7 @@ ConfineCursorToWindow(WindowPtr pWin, Bool generateEvents, Bool confineToScreen)
}
else
{
- sprite.hotLimits = *REGION_EXTENTS( pScreen, &pWin->borderSize);
+ sprite.hotLimits = *RegionExtents(&pWin->borderSize);
#ifdef SHAPE
sprite.hotShape = wBoundingShape(pWin) ? &pWin->borderSize
: NullRegion;
@@ -2117,7 +2117,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
{
BoxRec box;
- if(POINT_IN_REGION(pWin->drawable.pScreen, &pWin->borderSize, x, y, &box))
+ if(RegionContainsPoint(&pWin->borderSize, x, y, &box))
return TRUE;
#ifdef PANORAMIX
@@ -2125,7 +2125,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
int i;
for(i = 1; i < PanoramiXNumScreens; i++) {
- if(POINT_IN_REGION(sprite.screen,
+ if(RegionContainsPoint(
&sprite.windows[i]->borderSize,
x + panoramiXdataPtr[0].x - panoramiXdataPtr[i].x,
y + panoramiXdataPtr[0].y - panoramiXdataPtr[i].y,
@@ -2180,7 +2180,7 @@ XYToWindow(int x, int y)
*/
&& (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y))
&& (!wInputShape(pWin) ||
- POINT_IN_REGION(pWin->drawable.pScreen,
+ RegionContainsPoint(
wInputShape(pWin),
x - pWin->drawable.x,
y - pWin->drawable.y, &box))
@@ -2329,10 +2329,10 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
sprite.hotLimits.x2 -= xoff;
sprite.hotLimits.y2 -= yoff;
- if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg1))
- REGION_TRANSLATE(sprite.screen, &sprite.Reg1, xoff, yoff);
- if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg2))
- REGION_TRANSLATE(sprite.screen, &sprite.Reg2, xoff, yoff);
+ if (RegionNotEmpty(&sprite.Reg1))
+ RegionTranslate(&sprite.Reg1, xoff, yoff);
+ if (RegionNotEmpty(&sprite.Reg2))
+ RegionTranslate(&sprite.Reg2, xoff, yoff);
/* FIXME: if we call ConfineCursorToWindow, must we do anything else? */
if ((grab = inputInfo.pointer->grab) && grab->confineTo) {
@@ -2388,8 +2388,8 @@ DefineInitialRootWindow(register WindowPtr win)
#endif
sprite.screen = pScreen;
/* gotta UNINIT these someplace */
- REGION_NULL(pScreen, &sprite.Reg1);
- REGION_NULL(pScreen, &sprite.Reg2);
+ RegionNull(&sprite.Reg1);
+ RegionNull(&sprite.Reg2);
}
#endif
@@ -2467,7 +2467,7 @@ XineramaPointInWindowIsVisible(
if (!pWin->realized) return FALSE;
- if (POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box))
+ if (RegionContainsPoint(&pWin->borderClip, x, y, &box))
return TRUE;
if(!XineramaSetWindowPntrs(pWin)) return FALSE;
@@ -2481,9 +2481,9 @@ XineramaPointInWindowIsVisible(
x = xoff - panoramiXdataPtr[i].x;
y = yoff - panoramiXdataPtr[i].y;
- if(POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box)
+ if(RegionContainsPoint(&pWin->borderClip, x, y, &box)
&& (!wInputShape(pWin) ||
- POINT_IN_REGION(pWin->drawable.pScreen,
+ RegionContainsPoint(
wInputShape(pWin),
x - pWin->drawable.x,
y - pWin->drawable.y, &box)))
@@ -2659,7 +2659,7 @@ ProcWarpPointer(ClientPtr client)
static Bool
BorderSizeNotEmpty(WindowPtr pWin)
{
- if(REGION_NOTEMPTY(sprite.hotPhys.pScreen, &pWin->borderSize))
+ if(RegionNotEmpty(&pWin->borderSize))
return TRUE;
#ifdef PANORAMIX
@@ -2667,7 +2667,7 @@ BorderSizeNotEmpty(WindowPtr pWin)
int i;
for(i = 1; i < PanoramiXNumScreens; i++) {
- if(REGION_NOTEMPTY(sprite.screen, &sprite.windows[i]->borderSize))
+ if(RegionNotEmpty(&sprite.windows[i]->borderSize))
return TRUE;
}
}