Index: /trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp	(revision 42247)
+++ /trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp	(revision 42248)
@@ -827,7 +827,13 @@
 }
 
-void Display::SetVideoModeHint(ULONG aWidth, ULONG aHeight, ULONG aBitsPerPixel, ULONG aDisplay)
+void Display::SetVideoModeHint(ULONG aDisplay, BOOL aEnabled,
+                               BOOL aChangeOrigin, LONG aOriginX, LONG aOriginY,
+                               ULONG aWidth, ULONG aHeight, ULONG aBitsPerPixel)
 {
     PPDMIVMMDEVPORT pVMMDevPort = gVMMDev->getVMMDevPort ();
+    NOREF(aEnabled);
+    NOREF(aChangeOrigin);
+    NOREF(aOriginX);
+    NOREF(aOriginY);
 
     if (pVMMDevPort)
Index: /trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.h
===================================================================
--- /trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.h	(revision 42247)
+++ /trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.h	(revision 42248)
@@ -43,5 +43,5 @@
 
     void updatePointerShape(bool fVisible, bool fAlpha, uint32_t xHot, uint32_t yHot, uint32_t width, uint32_t height, void *pShape);
-    void SetVideoModeHint(ULONG aWidth, ULONG aHeight, ULONG aBitsPerPixel, ULONG aDisplay);
+    void SetVideoModeHint(ULONG aDisplay, BOOL aEnabled, BOOL aChangeOrigin, LONG aOriginX, LONG aOriginY, ULONG aWidth, ULONG aHeight, ULONG aBitsPerPixel);
 
     static const PDMDRVREG  DrvReg;
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h	(revision 42247)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h	(revision 42248)
@@ -243,4 +243,5 @@
 int handleCloseMedium(HandlerArg *a);
 int parseDiskType(const char *psz, MediumType_T *pDiskType);
+int parseBool(const char *psz, bool *pb);
 
 /* VBoxManageStorageController.cpp */
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp	(revision 42247)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp	(revision 42248)
@@ -882,5 +882,5 @@
         else if (!strcmp(a->argv[1], "setvideomodehint"))
         {
-            if (a->argc != 5 && a->argc != 6)
+            if (a->argc != 5 && a->argc != 6 && a->argc != 7 && a->argc != 9)
             {
                 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");
@@ -888,14 +888,37 @@
                 break;
             }
-            uint32_t xres = RTStrToUInt32(a->argv[2]);
-            uint32_t yres = RTStrToUInt32(a->argv[3]);
-            uint32_t bpp  = RTStrToUInt32(a->argv[4]);
-            uint32_t displayIdx = 0;
-            if (a->argc == 6)
-                displayIdx = RTStrToUInt32(a->argv[5]);
+            bool fEnabled = true;
+            uint32_t uXRes = RTStrToUInt32(a->argv[2]);
+            uint32_t uYRes = RTStrToUInt32(a->argv[3]);
+            uint32_t uBpp  = RTStrToUInt32(a->argv[4]);
+            uint32_t uDisplayIdx = 0;
+            bool fChangeOrigin = false;
+            int32_t iOriginX = 0;
+            int32_t iOriginY = 0;
+            if (a->argc >= 6)
+                uDisplayIdx = RTStrToUInt32(a->argv[5]);
+            if (a->argc >= 7)
+            {
+                int vrc = parseBool(a->argv[6], &fEnabled);
+                if (RT_FAILURE(vrc))
+                {
+                    errorSyntax(USAGE_CONTROLVM, "Either \"yes\" or \"no\" is expected");
+                    rc = E_FAIL;
+                    break;
+                }
+                fEnabled = !RTStrICmp(a->argv[6], "yes");
+            }
+            if (a->argc == 9)
+            {
+                iOriginX = RTStrToInt32(a->argv[7]);
+                iOriginY = RTStrToInt32(a->argv[8]);
+                fChangeOrigin = true;
+            }
 
             ComPtr<IDisplay> display;
             CHECK_ERROR_BREAK(console, COMGETTER(Display)(display.asOutParam()));
-            CHECK_ERROR_BREAK(display, SetVideoModeHint(xres, yres, bpp, displayIdx));
+            CHECK_ERROR_BREAK(display, SetVideoModeHint(uDisplayIdx, fEnabled,
+                                                        fChangeOrigin, iOriginX, iOriginY,
+                                                        uXRes, uYRes, uBpp));
         }
         else if (!strcmp(a->argv[1], "setcredentials"))
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp	(revision 42247)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp	(revision 42248)
@@ -122,5 +122,5 @@
 
 /** @todo move this into getopt, as getting bool values is generic */
-static int parseBool(const char *psz, bool *pb)
+int parseBool(const char *psz, bool *pb)
 {
     int rc = VINF_SUCCESS;
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 42247)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp	(revision 42248)
@@ -433,5 +433,7 @@
                      "                            vrdeproperty <name=[value]> |\n"
                      "                            vrdevideochannelquality <percent>\n"
-                     "                            setvideomodehint <xres> <yres> <bpp> [display] |\n"
+                     "                            setvideomodehint <xres> <yres> <bpp>\n"
+                     "                                            [[<display>] [<enabled:yes|no>\n"
+                     "                                              [<xorigin> <yorigin>]]] |\n"
                      "                            screenshotpng <file> [display] |\n"
                      "                            setcredentials <username> <password> <domain>\n"
Index: /trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp	(revision 42247)
+++ /trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp	(revision 42248)
@@ -2623,5 +2623,7 @@
                  */
                 /* communicate the resize event to the guest */
-                gpDisplay->SetVideoModeHint(uResizeWidth, uResizeHeight, 0, 0);
+                gpDisplay->SetVideoModeHint(0 /*=display*/, true /*=enabled*/, false /*=changeOrigin*/,
+                                            0 /*=originX*/, 0 /*=originY*/,
+                                            uResizeWidth, uResizeHeight, 0 /*=don't change bpp*/);
                 break;
 
@@ -4946,5 +4948,7 @@
             gpFramebuffer[0]->setFullscreen(enable);
             gfIgnoreNextResize = TRUE;
-            gpDisplay->SetVideoModeHint(NewWidth, NewHeight, 0, 0);
+            gpDisplay->SetVideoModeHint(0 /*=display*/, true /*=enabled*/,
+                                        false /*=changeOrigin*/, 0 /*=originX*/, 0 /*=originY*/,
+                                        NewWidth, NewHeight, 0 /*don't change bpp*/);
         }
     }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 42247)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 42248)
@@ -176,5 +176,5 @@
 
     /* Send new size-hint to the guest: */
-    session().GetConsole().GetDisplay().SetVideoModeHint(newSize.width(), newSize.height(), 0, screenId());
+    session().GetConsole().GetDisplay().SetVideoModeHint(screenId(), true, false, 0, 0, newSize.width(), newSize.height(), 0);
     /* And track whether we have had a "normal" resize since the last
      * fullscreen resize hint was sent: */
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 42247)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 42248)
@@ -14214,5 +14214,5 @@
   <interface
     name="IDisplay" extends="$unknown"
-    uuid="4b75c45c-e22e-4b75-b7cd-7ce9a83bb36e"
+    uuid="b83ee395-8679-40ca-8d60-1a0cbe724930"
     wsmap="managed"
     >
@@ -14278,8 +14278,34 @@
 
       </desc>
+      <param name="display" type="unsigned long" dir="in">
+        <desc>
+          The number of the guest display to send the hint to.
+        </desc>
+      </param>
+      <param name="enabled" type="boolean" dir="in">
+        <desc>
+          @c True, if this guest screen is enabled,
+          @c False otherwise.
+        </desc>
+      </param>
+      <param name="changeOrigin" type="boolean" dir="in">
+        <desc>
+          @c True, if the origin of the guest screen should be changed,
+          @c False otherwise.
+        </desc>
+      </param>
+      <param name="originX" type="long" dir="in">
+        <desc>
+          The X origin of the guest screen.
+        </desc>
+      </param>
+      <param name="originY" type="long" dir="in">
+        <desc>
+          The Y origin of the guest screen.
+        </desc>
+      </param>
       <param name="width" type="unsigned long" dir="in"/>
       <param name="height" type="unsigned long" dir="in"/>
       <param name="bitsPerPixel" type="unsigned long" dir="in"/>
-      <param name="display" type="unsigned long" dir="in"/>
     </method>
 
Index: /trunk/src/VBox/Main/include/DisplayImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/DisplayImpl.h	(revision 42247)
+++ /trunk/src/VBox/Main/include/DisplayImpl.h	(revision 42248)
@@ -161,5 +161,5 @@
     STDMETHOD(SetFramebuffer)(ULONG aScreenId, IFramebuffer *aFramebuffer);
     STDMETHOD(GetFramebuffer)(ULONG aScreenId, IFramebuffer **aFramebuffer, LONG *aXOrigin, LONG *aYOrigin);
-    STDMETHOD(SetVideoModeHint)(ULONG width, ULONG height, ULONG bitsPerPixel, ULONG display);
+    STDMETHOD(SetVideoModeHint)(ULONG aDisplay, BOOL aEnabled, BOOL aChangeOrigin, LONG aOriginX, LONG aOriginY, ULONG aWidth, ULONG aHeight, ULONG aBitsPerPixel);
     STDMETHOD(TakeScreenShot)(ULONG aScreenId, BYTE *address, ULONG width, ULONG height);
     STDMETHOD(TakeScreenShotToArray)(ULONG aScreenId, ULONG width, ULONG height, ComSafeArrayOut(BYTE, aScreenData));
Index: /trunk/src/VBox/Main/src-client/ConsoleVRDPServer.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/ConsoleVRDPServer.cpp	(revision 42247)
+++ /trunk/src/VBox/Main/src-client/ConsoleVRDPServer.cpp	(revision 42248)
@@ -1265,5 +1265,7 @@
     ConsoleVRDPServer *server = static_cast<ConsoleVRDPServer*>(pvCallback);
 
-    server->mConsole->getDisplay()->SetVideoModeHint(cWidth, cHeight, cBitsPerPixel, uScreenId);
+    server->mConsole->getDisplay()->SetVideoModeHint(uScreenId, TRUE /*=enabled*/,
+                                                     FALSE /*=changeOrigin*/, 0/*=OriginX*/, 0/*=OriginY*/,
+                                                     cWidth, cHeight, cBitsPerPixel);
 }
 
Index: /trunk/src/VBox/Main/src-client/DisplayImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/DisplayImpl.cpp	(revision 42247)
+++ /trunk/src/VBox/Main/src-client/DisplayImpl.cpp	(revision 42248)
@@ -2127,6 +2127,7 @@
 }
 
-STDMETHODIMP Display::SetVideoModeHint(ULONG aWidth, ULONG aHeight,
-    ULONG aBitsPerPixel, ULONG aDisplay)
+STDMETHODIMP Display::SetVideoModeHint(ULONG aDisplay, BOOL aEnabled,
+                                       BOOL aChangeOrigin, LONG aOriginX, LONG aOriginY,
+                                       ULONG aWidth, ULONG aHeight, ULONG aBitsPerPixel)
 {
     AutoCaller autoCaller(this);
@@ -2136,4 +2137,10 @@
 
     CHECK_CONSOLE_DRV (mpDrv);
+
+    /* XXX Ignore these parameters for now: */
+    NOREF(aChangeOrigin);
+    NOREF(aOriginX);
+    NOREF(aOriginY);
+    NOREF(aEnabled);
 
     /*
