Index: trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h
===================================================================
--- trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h	(revision 45048)
+++ trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h	(revision 45053)
@@ -142,7 +142,7 @@
 void crServerMuralFBOSwapBuffers(CRMuralInfo *mural);
 
-void crServerVBoxCompositionReenable(CRMuralInfo *mural);
+void crServerVBoxCompositionReenable(CRMuralInfo *mural, bool fOnContentHide);
 void crServerVBoxCompositionDisable(CRMuralInfo *mural);
-void crServerVBoxCompositionPresent(CRMuralInfo *mural);
+void crServerVBoxCompositionPresent(CRMuralInfo *mural, bool fOnContentHide);
 
 #define CR_SERVER_FBO_BB_IDX(_mural) ((_mural)->iBbBuffer)
Index: trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c
===================================================================
--- trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c	(revision 45048)
+++ trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c	(revision 45053)
@@ -513,5 +513,5 @@
 }
 
-void crServerVBoxCompositionPresent(CRMuralInfo *mural)
+void crServerVBoxCompositionPresent(CRMuralInfo *mural, bool fOnContentHide)
 {
     CRMuralInfo *currentMural = cr_server.currentMural;
@@ -522,16 +522,21 @@
     CRASSERT(curCtx == crStateGetCurrent());
 
-    if (!mural->bVisible)
-    {
-        return;
-    }
-
-    if (!mural->width || !mural->height)
-    {
-        return;
-    }
-
-    if (!CrVrScrCompositorEntryIsInList(&mural->CEntry))
-        return;
+    Assert(!CrVrScrCompositorIsEmpty(&mural->Compositor) == !fOnContentHide);
+
+    if (!fOnContentHide)
+    {
+        if (!mural->bVisible)
+        {
+            return;
+        }
+
+        if (!mural->width || !mural->height)
+        {
+            return;
+        }
+
+        if (!CrVrScrCompositorEntryIsInList(&mural->CEntry))
+            return;
+    }
 
     if (currentMural)
@@ -552,13 +557,13 @@
     crStateSwitchPostprocess(curCtx, NULL, idDrawFBO, idReadFBO);
 
-    mural->fCompositorPresented = GL_TRUE;
-}
-
-void crServerVBoxCompositionReenable(CRMuralInfo *mural)
+    mural->fCompositorPresented = !fOnContentHide;
+}
+
+void crServerVBoxCompositionReenable(CRMuralInfo *mural, bool fOnContentHide)
 {
     if (!mural->fCompositorPresented)
         return;
 
-    crServerVBoxCompositionPresent(mural);
+    crServerVBoxCompositionPresent(mural, fOnContentHide);
 }
 
@@ -595,5 +600,5 @@
     if (mural->fUseFBO == CR_SERVER_REDIR_FBO_BLT)
     {
-        crServerVBoxCompositionPresent(mural);
+        crServerVBoxCompositionPresent(mural, false);
         return;
     }
Index: trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c
===================================================================
--- trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c	(revision 45048)
+++ trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c	(revision 45053)
@@ -456,5 +456,5 @@
         if (mural->fUseFBO != CR_SERVER_REDIR_NONE)
         {
-            crServerVBoxCompositionReenable(mural);
+            crServerVBoxCompositionReenable(mural, false);
         }
     }
@@ -465,4 +465,5 @@
 {
     CRMuralInfo *mural = (CRMuralInfo *) crHashtableSearch(cr_server.muralTable, window);
+    bool fContainedRegions;
     if (!mural) {
 #if EXTRA_WARN
@@ -486,4 +487,5 @@
     }
 
+    fContainedRegions = !CrVrScrCompositorIsEmpty(&mural->Compositor);
     /* 2. do necessary modifications (see above comment) */
     /* NOTE: we can do it even if mural->fUseFBO = CR_SERVER_REDIR_NONE to make sure the compositor data is always up to date */
@@ -523,5 +525,5 @@
     if (mural->fUseFBO != CR_SERVER_REDIR_NONE)
     {
-        crServerVBoxCompositionReenable(mural);
+        crServerVBoxCompositionReenable(mural, fContainedRegions && CrVrScrCompositorIsEmpty(&mural->Compositor));
     }
 }
Index: trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.c
===================================================================
--- trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.c	(revision 45048)
+++ trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.c	(revision 45053)
@@ -644,8 +644,16 @@
     window = (WindowInfo *) crHashtableSearch(render_spu.windowTable, win);
     if (window) {
+#if !defined(RT_OS_DARWIN) || !defined(VBOX_WITH_COCOA_QT)
+        if (CrVrScrCompositorIsEmpty(pCompositor))
+            pCompositor = NULL;
+#endif
         renderspuVBoxCompositorSet( window, pCompositor);
         if (pCompositor)
         {
             renderspu_SystemVBoxPresentComposition(window, pCompositor, pChangedEntry);
+#if defined(RT_OS_DARWIN) && defined(VBOX_WITH_COCOA_QT)
+            if (CrVrScrCompositorIsEmpty(pCompositor))
+                renderspuVBoxCompositorSet( window, NULL);
+#endif
         }
     }
