Index: /trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h
===================================================================
--- /trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h	(revision 35997)
+++ /trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h	(revision 35998)
@@ -26,5 +26,5 @@
 #endif
 
-#define SHCROGL_SSM_VERSION 24
+#define SHCROGL_SSM_VERSION 25
 
 #define CR_MAX_WINDOWS 100
@@ -64,6 +64,7 @@
     GLboolean bUseFBO;       /*redirect to FBO instead of real host window*/
 
-    GLint  cVisibleRects;    /*count of visible rects*/
-    GLint *pVisibleRects;    /*visible rects left, top, right, bottom*/
+    GLint       cVisibleRects;    /*count of visible rects*/
+    GLint      *pVisibleRects;    /*visible rects left, top, right, bottom*/
+    GLboolean   bReceivedRects;   /*indicates if guest did any updates for visible regions*/
 
     GLuint idFBO, idColorTex, idDepthStencilRB;
Index: /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c
===================================================================
--- /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c	(revision 35997)
+++ /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c	(revision 35998)
@@ -340,25 +340,10 @@
             crServerTransformRect(&rectwr, &rect, -mural->gX, -mural->gY);
 
-#if 0 /*@todo recheck with compiz on guests, as we could sometimes have main compiz windows without visible rects*/
             if (!mural->pVisibleRects)
             {
-                tmppixels = crAlloc(4*(rect.x2-rect.x1)*(rect.y2-rect.y1));
-                if (!tmppixels)
+                /*we don't get any rects info for guest compiz windows, so we treat windows as visible unless explicitly received 0 visible rects*/
+                if (!mural->bReceivedRects)
                 {
-                    crWarning("Out of memory in crServerPresentFBO");
-                    crFree(pixels);
-                    return;
-                }
-
-                crServerCopySubImage(tmppixels, pixels, &rectwr, mural->fboWidth, mural->fboHeight);
-                /*Note: pfnPresentFBO would free tmppixels*/
-                cr_server.pfnPresentFBO(tmppixels, i, rect.x1-cr_server.screen[i].x, rect.y1-cr_server.screen[i].y, rect.x2-rect.x1, rect.y2-rect.y1);
-            }
-#endif
-            for (j=0; j<mural->cVisibleRects; ++j)
-            {
-                if (crServerIntersectRect(&rectwr, (CRrecti*) &mural->pVisibleRects[4*j], &sectr))
-                {
-                    tmppixels = crAlloc(4*(sectr.x2-sectr.x1)*(sectr.y2-sectr.y1));
+                    tmppixels = crAlloc(4*(rect.x2-rect.x1)*(rect.y2-rect.y1));
                     if (!tmppixels)
                     {
@@ -368,10 +353,30 @@
                     }
 
-                    crServerCopySubImage(tmppixels, pixels, &sectr, mural->fboWidth, mural->fboHeight);
+                    crServerCopySubImage(tmppixels, pixels, &rectwr, mural->fboWidth, mural->fboHeight);
                     /*Note: pfnPresentFBO would free tmppixels*/
-                    cr_server.pfnPresentFBO(tmppixels, i,
-                                            sectr.x1+mural->gX-cr_server.screen[i].x,
-                                            sectr.y1+mural->gY-cr_server.screen[i].y,
-                                            sectr.x2-sectr.x1, sectr.y2-sectr.y1);
+                    cr_server.pfnPresentFBO(tmppixels, i, rect.x1-cr_server.screen[i].x, rect.y1-cr_server.screen[i].y, rect.x2-rect.x1, rect.y2-rect.y1);
+                }
+            }
+            else
+            {
+                for (j=0; j<mural->cVisibleRects; ++j)
+                {
+                    if (crServerIntersectRect(&rectwr, (CRrecti*) &mural->pVisibleRects[4*j], &sectr))
+                    {
+                        tmppixels = crAlloc(4*(sectr.x2-sectr.x1)*(sectr.y2-sectr.y1));
+                        if (!tmppixels)
+                        {
+                            crWarning("Out of memory in crServerPresentFBO");
+                            crFree(pixels);
+                            return;
+                        }
+
+                        crServerCopySubImage(tmppixels, pixels, &sectr, mural->fboWidth, mural->fboHeight);
+                        /*Note: pfnPresentFBO would free tmppixels*/
+                        cr_server.pfnPresentFBO(tmppixels, i,
+                                                sectr.x1+mural->gX-cr_server.screen[i].x,
+                                                sectr.y1+mural->gY-cr_server.screen[i].y,
+                                                sectr.x2-sectr.x1, sectr.y2-sectr.y1);
+                    }
                 }
             }
Index: /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c
===================================================================
--- /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c	(revision 35997)
+++ /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c	(revision 35998)
@@ -86,4 +86,5 @@
         mural->cVisibleRects = 0;
         mural->pVisibleRects = NULL;
+        mural->bReceivedRects = GL_FALSE;
 
         /* generate ID for this new window/mural (special-case for file conns) */
@@ -282,4 +283,5 @@
 
     mural->cVisibleRects = cRects;
+    mural->bReceivedRects = GL_TRUE;
     if (cRects)
     {
