Skip to content

Commit

Permalink
composite: Don't double-redirect if someone asks for backing store twice
Browse files Browse the repository at this point in the history
v2: Belt-and-suspenders the unredirection path [vsyrjala]

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
  • Loading branch information
nwnk committed Dec 9, 2013
1 parent a2b2c27 commit 7b5d4f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions composite/compinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7b5d4f1

Please sign in to comment.