diff options
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; |