bs: Set the screen's bs support level to WhenMapped

Since we're using RedirectAutomatic to do this, we don't actually
preserve contents when unmapped.

v2: Don't say WhenMapped if Composite didn't initialize [vsyrjala]

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson 2013-11-05 09:58:17 -05:00
parent b61ccd5d9d
commit e0cac00560
2 changed files with 6 additions and 2 deletions

View File

@ -530,7 +530,11 @@ CreateRootWindow(ScreenPtr pScreen)
if (disableBackingStore)
pScreen->backingStoreSupport = NotUseful;
if (enableBackingStore)
pScreen->backingStoreSupport = Always;
pScreen->backingStoreSupport = WhenMapped;
#ifdef COMPOSITE
if (noCompositeExtension)
pScreen->backingStoreSupport = NotUseful;
#endif
pScreen->saveUnderSupport = NotUseful;

View File

@ -1640,7 +1640,7 @@ xf86SetBackingStore(ScreenPtr pScreen)
from = X_CONFIG;
}
free(options);
pScreen->backingStoreSupport = useBS ? Always : NotUseful;
pScreen->backingStoreSupport = useBS ? WhenMapped : NotUseful;
if (serverGeneration == 1)
xf86DrvMsg(pScreen->myNum, from, "Backing store %s\n",
useBS ? "enabled" : "disabled");