dix/mi: still more warning fixes
Fix up prototypes for PrintChildren and PrintWindowTree in the dix. Make miPrintRegion be unconditionally defined, and move the prototype into regionstr.h. Change a bunch of ScreenPtr pScreen = foo; to ScreenPtr pScreen; pScreen = foo; in window.c, so we avoid unused variable references (as inline REGION_* doesn't reference pScreen).
This commit is contained in:
parent
3a9b964258
commit
c3ea1f7db4
23
dix/window.c
23
dix/window.c
|
@ -187,7 +187,7 @@ _X_EXPORT int deltaSaveUndersViewable = 0;
|
||||||
* For debugging only
|
* For debugging only
|
||||||
******/
|
******/
|
||||||
|
|
||||||
int
|
static void
|
||||||
PrintChildren(WindowPtr p1, int indent)
|
PrintChildren(WindowPtr p1, int indent)
|
||||||
{
|
{
|
||||||
WindowPtr p2;
|
WindowPtr p2;
|
||||||
|
@ -197,14 +197,15 @@ PrintChildren(WindowPtr p1, int indent)
|
||||||
{
|
{
|
||||||
p2 = p1->firstChild;
|
p2 = p1->firstChild;
|
||||||
for (i=0; i<indent; i++) ErrorF( " ");
|
for (i=0; i<indent; i++) ErrorF( " ");
|
||||||
ErrorF( "%x\n", p1->drawable.id);
|
ErrorF( "%lx\n", p1->drawable.id);
|
||||||
miPrintRegion(&p1->clipList);
|
miPrintRegion(&p1->clipList);
|
||||||
PrintChildren(p2, indent+4);
|
PrintChildren(p2, indent+4);
|
||||||
p1 = p1->nextSib;
|
p1 = p1->nextSib;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintWindowTree()
|
static void
|
||||||
|
PrintWindowTree(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
WindowPtr pWin, p1;
|
WindowPtr pWin, p1;
|
||||||
|
@ -547,9 +548,11 @@ ClippedRegionFromBox(register WindowPtr pWin, RegionPtr Rgn,
|
||||||
register int x, register int y,
|
register int x, register int y,
|
||||||
register int w, register int h)
|
register int w, register int h)
|
||||||
{
|
{
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen;
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
|
|
||||||
|
pScreen = pWin->drawable.pScreen;
|
||||||
|
|
||||||
box = *(REGION_EXTENTS(pScreen, &pWin->winSize));
|
box = *(REGION_EXTENTS(pScreen, &pWin->winSize));
|
||||||
/* we do these calculations to avoid overflows */
|
/* we do these calculations to avoid overflows */
|
||||||
if (x > box.x1)
|
if (x > box.x1)
|
||||||
|
@ -1663,7 +1666,8 @@ CreateUnclippedWinSize (register WindowPtr pWin)
|
||||||
pRgn = REGION_CREATE(pWin->drawable.pScreen, &box, 1);
|
pRgn = REGION_CREATE(pWin->drawable.pScreen, &box, 1);
|
||||||
#ifdef SHAPE
|
#ifdef SHAPE
|
||||||
if (wBoundingShape (pWin) || wClipShape (pWin)) {
|
if (wBoundingShape (pWin) || wClipShape (pWin)) {
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen;
|
||||||
|
pScreen = pWin->drawable.pScreen;
|
||||||
|
|
||||||
REGION_TRANSLATE(pScreen, pRgn, - pWin->drawable.x,
|
REGION_TRANSLATE(pScreen, pRgn, - pWin->drawable.x,
|
||||||
- pWin->drawable.y);
|
- pWin->drawable.y);
|
||||||
|
@ -1699,7 +1703,8 @@ SetWinSize (register WindowPtr pWin)
|
||||||
(int)pWin->drawable.height);
|
(int)pWin->drawable.height);
|
||||||
#ifdef SHAPE
|
#ifdef SHAPE
|
||||||
if (wBoundingShape (pWin) || wClipShape (pWin)) {
|
if (wBoundingShape (pWin) || wClipShape (pWin)) {
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen;
|
||||||
|
pScreen = pWin->drawable.pScreen;
|
||||||
|
|
||||||
REGION_TRANSLATE(pScreen, &pWin->winSize, - pWin->drawable.x,
|
REGION_TRANSLATE(pScreen, &pWin->winSize, - pWin->drawable.x,
|
||||||
- pWin->drawable.y);
|
- pWin->drawable.y);
|
||||||
|
@ -1741,7 +1746,8 @@ SetBorderSize (register WindowPtr pWin)
|
||||||
(int)(pWin->drawable.height + (bw<<1)));
|
(int)(pWin->drawable.height + (bw<<1)));
|
||||||
#ifdef SHAPE
|
#ifdef SHAPE
|
||||||
if (wBoundingShape (pWin)) {
|
if (wBoundingShape (pWin)) {
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen;
|
||||||
|
pScreen = pWin->drawable.pScreen;
|
||||||
|
|
||||||
REGION_TRANSLATE(pScreen, &pWin->borderSize, - pWin->drawable.x,
|
REGION_TRANSLATE(pScreen, &pWin->borderSize, - pWin->drawable.x,
|
||||||
- pWin->drawable.y);
|
- pWin->drawable.y);
|
||||||
|
@ -1952,7 +1958,8 @@ MakeBoundingRegion (
|
||||||
BoxPtr pBox)
|
BoxPtr pBox)
|
||||||
{
|
{
|
||||||
RegionPtr pRgn;
|
RegionPtr pRgn;
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen;
|
||||||
|
pScreen = pWin->drawable.pScreen;
|
||||||
|
|
||||||
pRgn = REGION_CREATE(pScreen, pBox, 1);
|
pRgn = REGION_CREATE(pScreen, pBox, 1);
|
||||||
if (wBoundingShape (pWin)) {
|
if (wBoundingShape (pWin)) {
|
||||||
|
|
|
@ -321,4 +321,7 @@ extern void miRegionEmpty(
|
||||||
extern BoxPtr miRegionExtents(
|
extern BoxPtr miRegionExtents(
|
||||||
RegionPtr /*pReg*/);
|
RegionPtr /*pReg*/);
|
||||||
|
|
||||||
|
extern void miPrintRegion(
|
||||||
|
RegionPtr /*pReg*/);
|
||||||
|
|
||||||
#endif /* REGIONSTRUCT_H */
|
#endif /* REGIONSTRUCT_H */
|
||||||
|
|
|
@ -223,8 +223,7 @@ _X_EXPORT RegDataRec miEmptyData = {0, 0};
|
||||||
RegDataRec miBrokenData = {0, 0};
|
RegDataRec miBrokenData = {0, 0};
|
||||||
RegionRec miBrokenRegion = { { 0, 0, 0, 0 }, &miBrokenData };
|
RegionRec miBrokenRegion = { { 0, 0, 0, 0 }, &miBrokenData };
|
||||||
|
|
||||||
#ifdef DEBUG
|
_X_EXPORT void
|
||||||
int
|
|
||||||
miPrintRegion(rgn)
|
miPrintRegion(rgn)
|
||||||
RegionPtr rgn;
|
RegionPtr rgn;
|
||||||
{
|
{
|
||||||
|
@ -242,9 +241,7 @@ miPrintRegion(rgn)
|
||||||
ErrorF("%d %d %d %d \n",
|
ErrorF("%d %d %d %d \n",
|
||||||
rects[i].x1, rects[i].y1, rects[i].x2, rects[i].y2);
|
rects[i].x1, rects[i].y1, rects[i].x2, rects[i].y2);
|
||||||
ErrorF("\n");
|
ErrorF("\n");
|
||||||
return(num);
|
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
|
||||||
|
|
||||||
_X_EXPORT Bool
|
_X_EXPORT Bool
|
||||||
miRegionEqual(reg1, reg2)
|
miRegionEqual(reg1, reg2)
|
||||||
|
|
Loading…
Reference in New Issue