Index: /trunk/include/VBox/vmm/pdmifs.h
===================================================================
--- /trunk/include/VBox/vmm/pdmifs.h	(revision 83155)
+++ /trunk/include/VBox/vmm/pdmifs.h	(revision 83156)
@@ -712,13 +712,16 @@
 
     /**
-     * Notify the graphics device about the monitor positions since the ones we get from vmwgfx FIFO are not correct. In an ideal
-     * universe this method should not be here.
-     *
-     * @param   pInterface   Pointer to this interface.
-     * @param   cPositions   Number of monitor positions
-     * @param   pPosition    Monitor positions (offsets/origins) array
+     * Notify the graphics device about the monitor positions since the ones we get
+     * from vmwgfx FIFO are not correct.
+     *
+     * In an ideal universe this method should not be here.
+     *
+     * @param   pInterface      Pointer to this interface.
+     * @param   cPositions      Number of monitor positions.
+     * @param   paPositions     Monitor positions (offsets/origins) array.
      * @thread  Any.
      */
-    DECLR3CALLBACKMEMBER(void, pfnReportMonitorPositions, (PPDMIDISPLAYPORT pInterface, uint32_t cPositions, PRTPOINT pPosition));
+    DECLR3CALLBACKMEMBER(void, pfnReportMonitorPositions, (PPDMIDISPLAYPORT pInterface, uint32_t cPositions,
+                                                           PCRTPOINT paPositions));
 
 } PDMIDISPLAYPORT;
Index: /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp	(revision 83155)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp	(revision 83156)
@@ -712,6 +712,6 @@
 
 #endif /* LOG_ENABLED */
-
 #ifdef IN_RING3
+
 /**
  * @interface_method_impl{PDMIDISPLAYPORT,pfnSetViewport}
@@ -767,4 +767,5 @@
 # endif
 }
+
 
 /**
@@ -832,39 +833,38 @@
 }
 
+
 /**
- * Used to update screen offsets (positions) since appearently vmwgfx fails to pass correct offsets thru FIFO.
+ * @interface_method_impl{PDMIDISPLAYPORT,pfnReportMonitorPositions}
  *
- * @param   pInterface  The device instance.
- * @param   cPositions  The size of the pPosition array
- * @param   pPosition   Monitor positions. We assume for the disable monitors the positions is (-1, -1)
- */
-DECLCALLBACK(void) vmsvgaR3PortReportMonitorPositions(PPDMIDISPLAYPORT pInterface, uint32_t cPositions, PRTPOINT pPosition)
+ * Used to update screen offsets (positions) since appearently vmwgfx fails to
+ * pass correct offsets thru FIFO.
+ */
+DECLCALLBACK(void) vmsvgaR3PortReportMonitorPositions(PPDMIDISPLAYPORT pInterface, uint32_t cPositions, PCRTPOINT paPositions)
 {
-    PVGASTATECC pThisCC = RT_FROM_MEMBER(pInterface, VGASTATECC, IPort);
-    PVGASTATE   pThis   = PDMDEVINS_2_DATA(pThisCC->pDevIns, PVGASTATE);
-
-
-    PVMSVGAR3STATE  pSVGAState = pThisCC->svga.pSvgaR3State;
-    size_t cScreenCount = RT_ELEMENTS(pSVGAState->aScreens);
-
-    VMSVGASCREENOBJECT *pScreens = pSVGAState->aScreens;
-    /* We assume cPositions is the # of outputs Xserver reports and pPosition is (-1, -1) for disabled monitors. */
-    for (unsigned i = 0; i < cPositions; ++i)
-    {
-        /* Stop walking the array once we go thru all the monitors. */
-        if (i >= cScreenCount)
-            break;
-        if ( pScreens[i].xOrigin == -1
-          || pScreens[i].yOrigin == -1)
+    PVGASTATECC         pThisCC    = RT_FROM_MEMBER(pInterface, VGASTATECC, IPort);
+    PVGASTATE           pThis      = PDMDEVINS_2_DATA(pThisCC->pDevIns, PVGASTATE);
+    PVMSVGAR3STATE      pSVGAState = pThisCC->svga.pSvgaR3State;
+
+    /* We assume cPositions is the # of outputs Xserver reports and paPositions is (-1, -1) for disabled monitors. */
+    cPositions = RT_MIN(cPositions, RT_ELEMENTS(pSVGAState->aScreens));
+    for (uint32_t i = 0; i < cPositions; ++i)
+    {
+        if (   pSVGAState->aScreens[i].xOrigin == paPositions[i].x
+            && pSVGAState->aScreens[i].yOrigin == paPositions[i].y)
             continue;
-        if (   pScreens[i].xOrigin == pPosition[i].x
-            && pScreens[i].yOrigin == pPosition[i].y)
+
+        if (pSVGAState->aScreens[i].xOrigin == -1)
             continue;
-        pScreens[i].xOrigin = pPosition[i].x;
-        pScreens[i].yOrigin = pPosition[i].y;
-        pScreens[i].fModified = true;
-    }
+        if (pSVGAState->aScreens[i].yOrigin == -1)
+            continue;
+
+        pSVGAState->aScreens[i].xOrigin = paPositions[i].x;
+        pSVGAState->aScreens[i].yOrigin = paPositions[i].y;
+        pSVGAState->aScreens[i].fModified = true;
+    }
+
     vmsvgaR3VBVAResize(pThis, pThisCC);
 }
+
 #endif /* IN_RING3 */
 
Index: /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.h
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.h	(revision 83155)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.h	(revision 83156)
@@ -393,5 +393,5 @@
 DECLCALLBACK(void) vmsvgaR3PortSetViewport(PPDMIDISPLAYPORT pInterface, uint32_t uScreenId,
                                          uint32_t x, uint32_t y, uint32_t cx, uint32_t cy);
-DECLCALLBACK(void) vmsvgaR3PortReportMonitorPositions(PPDMIDISPLAYPORT pInterface, uint32_t cPositions, PRTPOINT pPosition);
+DECLCALLBACK(void) vmsvgaR3PortReportMonitorPositions(PPDMIDISPLAYPORT pInterface, uint32_t cPositions, PCRTPOINT paPositions);
 
 int vmsvgaR3Init(PPDMDEVINS pDevIns);
