From: Adam Jackson Date: Tue, 5 Nov 2013 15:12:28 +0000 (-0500) Subject: composite: Don't double-redirect if someone asks for backing store twice X-Git-Tag: xorg-server-1.14.99.904~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7b5d4f147fdef9edfeaa9c6565375111079efd11;p=platform%2Fupstream%2Fxorg-server.git composite: Don't double-redirect if someone asks for backing store twice v2: Belt-and-suspenders the unredirection path [vsyrjala] Reviewed-by: Keith Packard Signed-off-by: Adam Jackson --- 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;