Index: /trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
===================================================================
--- /trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c	(revision 55063)
+++ /trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c	(revision 55064)
@@ -150,5 +150,5 @@
 static void VBOXSaveMode(ScrnInfoPtr pScrn);
 static void VBOXRestoreMode(ScrnInfoPtr pScrn);
-static void setSizesAndCursorIntegration(ScrnInfoPtr pScrn, bool fLimitedContext);
+static void setSizesAndCursorIntegration(ScrnInfoPtr pScrn, bool fScreenInitTime, bool fVTSwitchTime);
 
 #ifndef XF86_SCRN_INTERFACE
@@ -1146,20 +1146,20 @@
     pNewMode->HDisplay = RT_CLAMP(pVBox->pScreens[0].aPreferredSize.cx, VBOX_VIDEO_MIN_SIZE, VBOX_VIDEO_MAX_VIRTUAL);
     pNewMode->VDisplay = RT_CLAMP(pVBox->pScreens[0].aPreferredSize.cy, VBOX_VIDEO_MIN_SIZE, VBOX_VIDEO_MAX_VIRTUAL);
-    setModeRandR11(pScrn, pScrn->currentMode, fLimitedContext);
-}
-
-#endif
-
-static void setSizesAndCursorIntegration(ScrnInfoPtr pScrn, bool fLimitedContext)
+    setModeRandR11(pScrn, pNewMode, fLimitedContext);
+}
+
+#endif
+
+static void setSizesAndCursorIntegration(ScrnInfoPtr pScrn, bool fScreenInitTime, bool fVTSwitchTime)
 {
     VBOXPtr pVBox = VBOXGetRec(pScrn);
     
-    TRACE_LOG("fLimitedContext=%d\n", fLimitedContext);
+    TRACE_LOG("fScreenInitTime=%d, fVTSwitchTime=%d\n", (int)fScreenInitTime, (int)fVTSwitchTime);
 #ifdef VBOXVIDEO_13
-    setSizesRandR12(pScrn, fLimitedContext);
+    setSizesRandR12(pScrn, fScreenInitTime);
 #else
-    setSizesRandR11(pScrn, fLimitedContext);
-#endif
-    if (!fLimitedContext)
+    setSizesRandR11(pScrn, fScreenInitTime);
+#endif
+    if (!fVTSwitchTime)
         vbvxReprobeCursor(pScrn);
 }
@@ -1183,5 +1183,5 @@
         vbvxReadSizesAndCursorIntegrationFromProperties(pScrn, &fNeedUpdate);
     if (fNeedUpdate)
-        setSizesAndCursorIntegration(pScrn, false);
+        setSizesAndCursorIntegration(pScrn, false, false);
 }
 
@@ -1332,5 +1332,5 @@
 #endif
     /* set first video mode */
-    setSizesAndCursorIntegration(pScrn, true);
+    setSizesAndCursorIntegration(pScrn, true, false);
 
     /* Register block and wake-up handlers for getting new screen size hints. */
@@ -1401,5 +1401,5 @@
     vbvxReadSizesAndCursorIntegrationFromHGSMI(pScrn, NULL);
     vbvxReadSizesAndCursorIntegrationFromProperties(pScrn, NULL);
-    setSizesAndCursorIntegration(pScrn, true);
+    setSizesAndCursorIntegration(pScrn, false, true);
 #ifdef SET_HAVE_VT_PROPERTY
     updateHasVTProperty(pScrn, TRUE);
