Index: trunk/src/VBox/Additions/common/crOpenGL/context.c
===================================================================
--- trunk/src/VBox/Additions/common/crOpenGL/context.c	(revision 41962)
+++ trunk/src/VBox/Additions/common/crOpenGL/context.c	(revision 41963)
@@ -121,5 +121,12 @@
     winInfo->width = size[0];
     winInfo->height = size[1];
-    winInfo->mapped = 1;
+#ifdef VBOX_WITH_WDDM
+    if (stub.bRunningUnderWDDM)
+        winInfo->mapped = 0;
+    else
+#endif
+    {
+        winInfo->mapped = 1;
+    }
 
     if (!dpyName)
@@ -166,4 +173,8 @@
 {
 #if defined(WINDOWS)
+# ifdef VBOX_WITH_WDDM
+    if (stub.bRunningUnderWDDM)
+        return win->mapped;
+# endif
     return GL_TRUE;
 #elif defined(Darwin)
@@ -289,5 +300,12 @@
     winInfo->type = UNDECIDED;
     winInfo->spuWindow = -1;
-    winInfo->mapped = -1; /* don't know */
+#ifdef VBOX_WITH_WDDM
+    if (stub.bRunningUnderWDDM)
+        winInfo->mapped = 0;
+    else
+#endif
+    {
+        winInfo->mapped = -1; /* don't know */
+    }
     winInfo->pOwner = NULL;
 #ifdef CR_NEWWINTRACK
@@ -1146,10 +1164,15 @@
         window->width = winW;
         window->height = winH;
-        if (stub.trackWindowSize)
-            stub.spuDispatch.WindowSize( window->spuWindow, winW, winH );
-        if (stub.trackWindowPos)
-            stub.spuDispatch.WindowPosition(window->spuWindow, x, y);
-        if (winW > 0 && winH > 0)
-            stub.spu->dispatch_table.Viewport( 0, 0, winW, winH );
+#if defined(WINDOWS) && defined(VBOX_WITH_WDDM)
+        if (stubIsWindowVisible(window))
+#endif
+        {
+            if (stub.trackWindowSize)
+                stub.spuDispatch.WindowSize( window->spuWindow, winW, winH );
+            if (stub.trackWindowPos)
+                stub.spuDispatch.WindowPosition(window->spuWindow, x, y);
+            if (winW > 0 && winH > 0)
+                stub.spu->dispatch_table.Viewport( 0, 0, winW, winH );
+        }
 #ifdef VBOX_WITH_WDDM
         stub.spu->dispatch_table.WindowVisibleRegion(window->spuWindow, 0, NULL);
Index: trunk/src/VBox/Additions/common/crOpenGL/load.c
===================================================================
--- trunk/src/VBox/Additions/common/crOpenGL/load.c	(revision 41962)
+++ trunk/src/VBox/Additions/common/crOpenGL/load.c	(revision 41963)
@@ -831,5 +831,5 @@
     PVBOXCR_UPDATEWNDCB pCbData = (PVBOXCR_UPDATEWNDCB) data2;
     VBOXDISPMP_REGIONS *pRegions = &pCbData->Regions;
-    bool bChanged = false;
+    bool bChanged = false, bDoMap = false;
     HRGN hNewRgn = INVALID_HANDLE_VALUE;
 
@@ -847,14 +847,11 @@
     }
 
-    if (!pWindow->mapped)
-    {
-        pWindow->mapped = GL_TRUE;
-        bChanged = true;
-        crDebug("Dispatched: WindowShow(%i, %i)", pWindow->spuWindow, pWindow->mapped);
-        stub.spu->dispatch_table.WindowShow(pWindow->spuWindow, pWindow->mapped);
-    }
-
     if (pRegions->pRegions->fFlags.bAddVisibleRects || pRegions->pRegions->fFlags.bSetViewRect)
     {
+        if (!pWindow->mapped)
+        {
+            bDoMap = true;
+        }
+
         /* ensure data integrity */
         Assert(!pRegions->pRegions->fFlags.bAddHiddenRects);
@@ -871,5 +868,5 @@
             winH = pRegions->pRegions->RectsInfo.aRects[0].bottom - winY;
 
-            if (stub.trackWindowPos && (winX!=pWindow->x || winY!=pWindow->y))
+            if (stub.trackWindowPos && (bDoMap || winX!=pWindow->x || winY!=pWindow->y))
             {
                 crDebug("Dispatched WindowPosition (%i)", pWindow->spuWindow);
@@ -880,5 +877,5 @@
             }
 
-            if (stub.trackWindowSize && (winW!=pWindow->width || winH!=pWindow->height))
+            if (stub.trackWindowSize && (bDoMap || winW!=pWindow->width || winH!=pWindow->height))
             {
                 crDebug("Dispatched WindowSize (%i)", pWindow->spuWindow);
@@ -962,4 +959,12 @@
             }
         }
+    }
+
+    if (bDoMap)
+    {
+        pWindow->mapped = GL_TRUE;
+        bChanged = true;
+        crDebug("Dispatched: WindowShow(%i, %i)", pWindow->spuWindow, pWindow->mapped);
+        stub.spu->dispatch_table.WindowShow(pWindow->spuWindow, pWindow->mapped);
     }
 
Index: trunk/src/VBox/Additions/common/crOpenGL/stub.c
===================================================================
--- trunk/src/VBox/Additions/common/crOpenGL/stub.c	(revision 41962)
+++ trunk/src/VBox/Additions/common/crOpenGL/stub.c	(revision 41963)
@@ -249,5 +249,10 @@
             if (bForceUpdate || winW != pWindow->width || winH != pWindow->height) {
                 crDebug("Dispatched WindowSize (%i)", pWindow->spuWindow);
-                stub.spuDispatch.WindowSize(pWindow->spuWindow, winW, winH);
+#ifdef VBOX_WITH_WDDM
+                if (!stub.bRunningUnderWDDM || pWindow->mapped)
+#endif
+                {
+                    stub.spuDispatch.WindowSize(pWindow->spuWindow, winW, winH);
+                }
                 pWindow->width = winW;
                 pWindow->height = winH;
@@ -258,5 +263,10 @@
             if (bForceUpdate || winX != pWindow->x || winY != pWindow->y) {
                 crDebug("Dispatched WindowPosition (%i)", pWindow->spuWindow);
-                stub.spuDispatch.WindowPosition(pWindow->spuWindow, winX, winY);
+#ifdef VBOX_WITH_WDDM
+                if (!stub.bRunningUnderWDDM || pWindow->mapped)
+#endif
+                {
+                    stub.spuDispatch.WindowPosition(pWindow->spuWindow, winX, winY);
+                }
                 pWindow->x = winX;
                 pWindow->y = winY;
