[PATCH 07/13] composite: Don't double-redirect if someone asks for backing store twice

Adam Jackson ajax at redhat.com
Fri Dec 6 15:21:24 PST 2013


v2: Belt-and-suspenders the unredirection path [vsyrjala]

Reviewed-by: Keith Packard <keithp at keithp.com>
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 composite/compinit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/composite/compinit.c b/composite/compinit.c
index 6431464..3c91091 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;
-- 
1.8.4.2



More information about the xorg-devel mailing list