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>
This commit is contained in:
parent
a2b2c271e0
commit
7b5d4f147f
|
@ -117,11 +117,11 @@ compChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
|
||||||
|
|
||||||
if (ret && (mask & CWBackingStore) &&
|
if (ret && (mask & CWBackingStore) &&
|
||||||
pScreen->backingStoreSupport != NotUseful) {
|
pScreen->backingStoreSupport != NotUseful) {
|
||||||
if (pWin->backingStore != NotUseful) {
|
if (pWin->backingStore != NotUseful && !pWin->backStorage) {
|
||||||
compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic);
|
compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic);
|
||||||
pWin->backStorage = (pointer) (intptr_t) 1;
|
pWin->backStorage = (pointer) (intptr_t) 1;
|
||||||
}
|
}
|
||||||
else {
|
else if (pWin->backingStore == NotUseful && pWin->backStorage) {
|
||||||
compUnredirectWindow(serverClient, pWin,
|
compUnredirectWindow(serverClient, pWin,
|
||||||
CompositeRedirectAutomatic);
|
CompositeRedirectAutomatic);
|
||||||
pWin->backStorage = NULL;
|
pWin->backStorage = NULL;
|
||||||
|
|
Loading…
Reference in New Issue