diff --git a/composite/compinit.c b/composite/compinit.c index 6ea33ea4e..539dc0460 100644 --- a/composite/compinit.c +++ b/composite/compinit.c @@ -108,11 +108,11 @@ compInstallColormap(ColormapPtr pColormap) static void compCheckBackingStore(WindowPtr pWin) { - if (pWin->backingStore != NotUseful && !pWin->backStorage) { + if (pWin->backingStore != NotUseful) { compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic); pWin->backStorage = TRUE; } - else if (pWin->backingStore == NotUseful && pWin->backStorage) { + else { compUnredirectWindow(serverClient, pWin, CompositeRedirectAutomatic); pWin->backStorage = FALSE; diff --git a/dix/window.c b/dix/window.c index ec94a8843..d99b61c02 100644 --- a/dix/window.c +++ b/dix/window.c @@ -1328,6 +1328,12 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) client->errorValue = val; goto PatchUp; } + /* if we're not actually changing the window's state, hide + * CWBackingStore from vmaskCopy so it doesn't get passed to + * ->ChangeWindowAttributes below + */ + if (pWin->backingStore == val) + continue; pWin->backingStore = val; break; case CWBackingPlanes: