summaryrefslogtreecommitdiff
path: root/composite
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2013-11-05 10:12:28 -0500
committerAdam Jackson <ajax@redhat.com>2013-12-09 13:20:36 -0500
commit7b5d4f147fdef9edfeaa9c6565375111079efd11 (patch)
tree1bb026b069c4185a9d7cd11577d2c5666c1199cf /composite
parenta2b2c271e0ca87d3188ba2741b6db9bbbdc599f5 (diff)
composite: Don't double-redirect if someone asks for backing store twice
v2: Belt-and-suspenders the unredirection path [vsyrjala] Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'composite')
-rw-r--r--composite/compinit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/composite/compinit.c b/composite/compinit.c
index 64314640f..3c910914e 100644
--- a/composite/compinit.c
+++ b/composite/compinit.c
@@ -117,11 +117,11 @@ compChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
if (ret && (mask & CWBackingStore) &&
pScreen->backingStoreSupport != NotUseful) {
- if (pWin->backingStore != NotUseful) {
+ if (pWin->backingStore != NotUseful && !pWin->backStorage) {
compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic);
pWin->backStorage = (pointer) (intptr_t) 1;
}
- else {
+ else if (pWin->backingStore == NotUseful && pWin->backStorage) {
compUnredirectWindow(serverClient, pWin,
CompositeRedirectAutomatic);
pWin->backStorage = NULL;