summaryrefslogtreecommitdiff
path: root/exa/exa_offscreen.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-04-29 23:44:27 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2007-04-29 23:44:27 +0200
commitd3f8667341bfe6dc7d0258c4ad69377f37d88d95 (patch)
tree50c8d873d88651187148791a34ad7e4149b2bc6c /exa/exa_offscreen.c
parent5e4b3232dafe3b0dec65bf639bebaba4774210b7 (diff)
EXA: Fix exaEnableDisableFBAccess for nested disables and enables.
Diffstat (limited to 'exa/exa_offscreen.c')
-rw-r--r--exa/exa_offscreen.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/exa/exa_offscreen.c b/exa/exa_offscreen.c
index 7708dd739..38ad58f60 100644
--- a/exa/exa_offscreen.c
+++ b/exa/exa_offscreen.c
@@ -341,13 +341,15 @@ exaEnableDisableFBAccess (int index, Bool enable)
ScreenPtr pScreen = screenInfo.screens[index];
ExaScreenPriv (pScreen);
- if (!enable) {
+ if (!enable && pExaScr->disableFbCount++ == 0) {
if (pExaScr->info->exa_minor < 1)
ExaOffscreenSwapOut (pScreen);
else
ExaOffscreenEjectPixmaps (pScreen);
pExaScr->swappedOut = TRUE;
- } else {
+ }
+
+ if (enable && --pExaScr->disableFbCount == 0) {
if (pExaScr->info->exa_minor < 1)
ExaOffscreenSwapIn (pScreen);
pExaScr->swappedOut = FALSE;