Index: /trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDispIf.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDispIf.cpp	(revision 53312)
+++ /trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDispIf.cpp	(revision 53313)
@@ -53,5 +53,5 @@
 
 DWORD EnableAndResizeDispDev(DEVMODE *paDeviceModes, DISPLAY_DEVICE *paDisplayDevices, DWORD totalDispNum, UINT Id, DWORD aWidth, DWORD aHeight,
-                                    DWORD aBitsPerPixel, DWORD aPosX, DWORD aPosY, BOOL fEnabled, BOOL fExtDispSup);
+                                    DWORD aBitsPerPixel, LONG aPosX, LONG aPosY, BOOL fEnabled, BOOL fExtDispSup);
 
 static DWORD vboxDispIfWddmResizeDisplay(PCVBOXDISPIF const pIf, UINT Id, BOOL fEnable, DISPLAY_DEVICE * paDisplayDevices, DEVMODE *paDeviceMode, UINT devModes);
@@ -320,4 +320,8 @@
         if (pDeviceMode->dmFields & DM_POSITION)
         {
+            LogFlowFunc(("DM_POSITION %d,%d -> %d,%d\n",
+                         pCfg->pModeInfoArray[iSrcMode].sourceMode.position.x,
+                         pCfg->pModeInfoArray[iSrcMode].sourceMode.position.y,
+                         pDeviceMode->dmPosition.x, pDeviceMode->dmPosition.y));
             pCfg->pModeInfoArray[iSrcMode].sourceMode.position.x = pDeviceMode->dmPosition.x;
             pCfg->pModeInfoArray[iSrcMode].sourceMode.position.y = pDeviceMode->dmPosition.y;
@@ -1393,5 +1397,5 @@
     DWORD winEr = NO_ERROR;
 
-    Log(("VBoxTray: vboxDispIfResizeModesWDDM\n"));
+    Log(("VBoxTray: vboxDispIfResizeModesWDDM iChanged %d cDevModes %d\n", iChangedMode, cDevModes));
     VBoxRrRetryStop();
 
Index: /trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDisplay.cpp
===================================================================
--- /trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDisplay.cpp	(revision 53312)
+++ /trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDisplay.cpp	(revision 53313)
@@ -225,5 +225,5 @@
 
 DWORD EnableAndResizeDispDev(DEVMODE *paDeviceModes, DISPLAY_DEVICE *paDisplayDevices, DWORD totalDispNum, UINT Id, DWORD aWidth, DWORD aHeight,
-                                    DWORD aBitsPerPixel, DWORD aPosX, DWORD aPosY, BOOL fEnabled, BOOL fExtDispSup)
+                                    DWORD aBitsPerPixel, LONG aPosX, LONG aPosY, BOOL fEnabled, BOOL fExtDispSup)
 {
     DISPLAY_DEVICE displayDeviceTmp;
@@ -442,15 +442,14 @@
 /* Returns TRUE to try again. */
 static BOOL ResizeDisplayDevice(UINT Id, DWORD Width, DWORD Height, DWORD BitsPerPixel,
-                                BOOL fEnabled, DWORD dwNewPosX, DWORD dwNewPosY,
+                                BOOL fEnabled, LONG dwNewPosX, LONG dwNewPosY, bool fChangeOrigin,
                                 VBOXDISPLAYCONTEXT *pCtx, BOOL fExtDispSup)
 {
     BOOL fDispAlreadyEnabled = false; /* check whether the monitor with ID is already enabled. */
     BOOL fModeReset = (Width == 0 && Height == 0 && BitsPerPixel == 0 &&
-                       dwNewPosX == 0 && dwNewPosY == 0);
+                       dwNewPosX == 0 && dwNewPosY == 0 && !fChangeOrigin);
     DWORD dmFields = 0;
 
-    LogFlowFunc(("ResizeDisplayDevice Width= %d, Height=%d , PosX=%d and PosY=%d \
-         fEnabled = %d, fExtDisSup = %d\n",
-          Width, Height, dwNewPosX, dwNewPosY, fEnabled, fExtDispSup));
+    LogFlowFunc(("[%d] %dx%d at %d,%d fChangeOrigin %d fEnabled %d fExtDisSup %d\n",
+          Id, Width, Height, dwNewPosX, dwNewPosY, fChangeOrigin, fEnabled, fExtDispSup));
 
     if (!gCtx.fAnyX)
@@ -491,11 +490,12 @@
         {
             LogRel(("Extended Display Support.\n"));
-            LogFlowFunc(("ResizeDisplayDevice1: %dx%dx%d at %d,%d . Id = %d and DevNum=%d, fEnabled=%d\n",
-                  paDeviceModes[Id].dmPelsWidth,
-                  paDeviceModes[Id].dmPelsHeight,
-                  paDeviceModes[Id].dmBitsPerPel,
-                  paDeviceModes[Id].dmPosition.x,
-                  paDeviceModes[Id].dmPosition.y,
-                  Id, DevNum, fEnabled));
+            LogFlowFunc(("[%d] %dx%dx%d at %d,%d, dmFields 0x%x\n",
+                  i,
+                  paDeviceModes[i].dmPelsWidth,
+                  paDeviceModes[i].dmPelsHeight,
+                  paDeviceModes[i].dmBitsPerPel,
+                  paDeviceModes[i].dmPosition.x,
+                  paDeviceModes[i].dmPosition.y,
+                  paDeviceModes[i].dmFields));
         }
         else
@@ -537,12 +537,16 @@
         dmFields |= DM_BITSPERPEL;
 
-    if (!dwNewPosX && !dwNewPosY)
-    {
-        /* @fixme: zero position is a valid state, so another values should be used as a special case !!! */
+    if (!fChangeOrigin)
+    {
+        /* Use existing position. */
         dwNewPosX = paRects[Id].left;
         dwNewPosY = paRects[Id].top;
-    }
-    else
-        dmFields |= DM_POSITION;
+        LogFlowFunc(("existing dwNewPosX %d, dwNewPosY %d\n", dwNewPosX, dwNewPosY));
+    }
+
+    /* Always update the position.
+     * It is either explicitly requested or must be set to the existing position.
+     */
+    dmFields |= DM_POSITION;
 
     /* Check whether a mode reset or a change is requested.
@@ -612,5 +616,5 @@
             }
 
-            LogFlowFunc(("ResizeDisplayDevice: pfnChangeDisplaySettingsEx %x: %dx%dx%d at %d,%d\n",
+            LogFlowFunc(("ResizeDisplayDevice: pfnChangeDisplaySettingsEx %x: %dx%dx%d at %d,%d fields 0x%X\n",
                   gCtx.pfnChangeDisplaySettingsEx,
                   paDeviceModes[i].dmPelsWidth,
@@ -618,5 +622,6 @@
                   paDeviceModes[i].dmBitsPerPel,
                   paDeviceModes[i].dmPosition.x,
-                  paDeviceModes[i].dmPosition.y));
+                  paDeviceModes[i].dmPosition.y,
+                  paDeviceModes[i].dmFields));
         }
 
@@ -849,4 +854,5 @@
                                                          displayChangeRequest.cxOrigin,
                                                          displayChangeRequest.cyOrigin,
+                                                         displayChangeRequest.fChangeOrigin,
                                                          pCtx,
                                                          fExtDispSup
