diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2007-04-29 23:44:27 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2007-04-29 23:44:27 +0200 |
commit | d3f8667341bfe6dc7d0258c4ad69377f37d88d95 (patch) | |
tree | 50c8d873d88651187148791a34ad7e4149b2bc6c /exa/exa_offscreen.c | |
parent | 5e4b3232dafe3b0dec65bf639bebaba4774210b7 (diff) |
EXA: Fix exaEnableDisableFBAccess for nested disables and enables.
Diffstat (limited to 'exa/exa_offscreen.c')
-rw-r--r-- | exa/exa_offscreen.c | 6 |
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; |