summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2014-09-15 12:10:55 -0400
committerAdam Jackson <ajax@redhat.com>2014-10-09 11:14:53 +0200
commit81d76a835b2f647e3051b1d93606e59db7998d76 (patch)
treed8681e80a1d712c68d94b47d814c6a88b780be1f
parent322ba42c23a3a107f7a62fb1c449792b616e5eba (diff)
dix: Lower backStorage to a bit instead of a pointer
Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--composite/compinit.c4
-rw-r--r--dix/window.c2
-rw-r--r--include/windowstr.h2
-rw-r--r--mi/miexpose.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/composite/compinit.c b/composite/compinit.c
index 48e938fac..111c16e5d 100644
--- a/composite/compinit.c
+++ b/composite/compinit.c
@@ -119,12 +119,12 @@ compChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
pScreen->backingStoreSupport != NotUseful) {
if (pWin->backingStore != NotUseful && !pWin->backStorage) {
compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic);
- pWin->backStorage = (void *) (intptr_t) 1;
+ pWin->backStorage = TRUE;
}
else if (pWin->backingStore == NotUseful && pWin->backStorage) {
compUnredirectWindow(serverClient, pWin,
CompositeRedirectAutomatic);
- pWin->backStorage = NULL;
+ pWin->backStorage = FALSE;
}
}
diff --git a/dix/window.c b/dix/window.c
index f227e4ce4..e1645c3e7 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -362,7 +362,7 @@ SetWindowToDefaults(WindowPtr pWin)
pWin->cursorIsNone = TRUE;
pWin->backingStore = NotUseful;
- pWin->backStorage = (void *) NULL;
+ pWin->backStorage = 0;
pWin->mapped = FALSE; /* off */
pWin->realized = FALSE; /* off */
diff --git a/include/windowstr.h b/include/windowstr.h
index 81f5f8c3c..740f4a6c0 100644
--- a/include/windowstr.h
+++ b/include/windowstr.h
@@ -144,12 +144,12 @@ typedef struct _Window {
Mask eventMask; /* mask from the creating client */
PixUnion background;
PixUnion border;
- void *backStorage; /* null when BS disabled */
WindowOptPtr optional;
unsigned backgroundState:2; /* None, Relative, Pixel, Pixmap */
unsigned borderIsPixel:1;
unsigned cursorIsNone:1; /* else real cursor (might inherit) */
unsigned backingStore:2;
+ unsigned backStorage:1; /* if bs is allocated */
unsigned saveUnder:1;
unsigned bitGravity:4;
unsigned winGravity:4;
diff --git a/mi/miexpose.c b/mi/miexpose.c
index 555f3b20a..de8ee6c2a 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -143,7 +143,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
if (!pGC->graphicsExposures &&
(pDstDrawable->type == DRAWABLE_PIXMAP) &&
((pSrcDrawable->type == DRAWABLE_PIXMAP) ||
- (((WindowPtr) pSrcDrawable)->backStorage == NULL)))
+ (((WindowPtr) pSrcDrawable)->backStorage == 0)))
return NULL;
srcBox.x1 = srcx;