Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp	(revision 26921)
@@ -203,7 +203,7 @@
 {
     if (machineLogic() &&
-        machineLogic()->machineWindowWrapper() &&
-        machineLogic()->machineWindowWrapper()->machineWindow())
-        return machineLogic()->machineWindowWrapper()->machineWindow();
+        machineLogic()->mainMachineWindow() &&
+        machineLogic()->mainMachineWindow()->machineWindow())
+        return machineLogic()->mainMachineWindow()->machineWindow();
     else
         return 0;
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 26921)
@@ -371,7 +371,7 @@
     , m_pActionsPool(pActionsPool)
     , m_visualStateType(visualStateType)
-    , m_pMachineWindowWrapper(0)
     , m_pRunningActions(0)
     , m_pRunningOrPausedActions(0)
+    , m_fIsWindowsCreated(false)
     , m_fIsPreventAutoStart(false)
     , m_fIsPreventAutoClose(false)
@@ -390,4 +390,9 @@
 {
     return uisession()->session();
+}
+
+void UIMachineLogic::addMachineWindow(UIMachineWindow *pMachineWindow)
+{
+    m_machineWindowsList << pMachineWindow;
 }
 
@@ -727,33 +732,40 @@
 void UIMachineLogic::sltToggleGuestAutoresize(bool fEnabled)
 {
-    /* Do not process if window or view is missing! */
-    if (!machineWindowWrapper() || !machineWindowWrapper()->machineView())
+    /* Do not process if window(s) missed! */
+    if (!machineWindowsCreated())
         return;
 
-    machineWindowWrapper()->machineView()->setGuestAutoresizeEnabled(fEnabled);
+    /* Toggle guest-autoresize feature for all view(s)! */
+    foreach(UIMachineWindow *pMachineWindow, machineWindows())
+        pMachineWindow->machineView()->setGuestAutoresizeEnabled(fEnabled);
 }
 
 void UIMachineLogic::sltAdjustWindow()
 {
-    /* Do not process if window or view is missing! */
-    if (!machineWindowWrapper() || !machineWindowWrapper()->machineView())
+    /* Do not process if window(s) missed! */
+    if (!machineWindowsCreated())
         return;
 
-    /* Exit maximized window state if actual: */
-    if (machineWindowWrapper()->machineWindow()->isMaximized())
-        machineWindowWrapper()->machineWindow()->showNormal();
-
-    /* Normalize view's geometry: */
-    machineWindowWrapper()->machineView()->normalizeGeometry(true);
+    /* Adjust all window(s)! */
+    foreach(UIMachineWindow *pMachineWindow, machineWindows())
+    {
+        /* Exit maximized window state if actual: */
+        if (pMachineWindow->machineWindow()->isMaximized())
+            pMachineWindow->machineWindow()->showNormal();
+
+        /* Normalize view's geometry: */
+        pMachineWindow->machineView()->normalizeGeometry(true);
+    }
 }
 
 void UIMachineLogic::sltToggleMouseIntegration(bool fOff)
 {
-    /* Do not process if window or view is missing! */
-    if (!machineWindowWrapper() || !machineWindowWrapper()->machineView())
+    /* Do not process if window(s) missed! */
+    if (!machineWindowsCreated())
         return;
 
-    /* Disable/Enable mouse-integration for view: */
-    machineWindowWrapper()->machineView()->setMouseIntegrationEnabled(!fOff);
+    /* Disable/Enable mouse-integration for all view(s): */
+    foreach(UIMachineWindow *pMachineWindow, machineWindows())
+        pMachineWindow->machineView()->setMouseIntegrationEnabled(!fOff);
 }
 
@@ -785,6 +797,6 @@
 void UIMachineLogic::sltTakeSnapshot()
 {
-    /* Do not process if window is missing! */
-    if (!machineWindowWrapper())
+    /* Do not process if window(s) missed! */
+    if (!machineWindowsCreated())
         return;
 
@@ -801,5 +813,5 @@
     CMachine machine = session().GetMachine();
 
-    VBoxTakeSnapshotDlg dlg(machineWindowWrapper()->machineWindow(), machine);
+    VBoxTakeSnapshotDlg dlg(mainMachineWindow()->machineWindow(), machine);
 
     QString strTypeId = machine.GetOSTypeId();
@@ -836,10 +848,10 @@
 void UIMachineLogic::sltShowInformationDialog()
 {
-    /* Do not process if window is missing! */
-    if (!machineWindowWrapper())
+    /* Do not process if window(s) missed! */
+    if (!machineWindowsCreated())
         return;
 
     // TODO: Call for singleton information dialog for this machine!
-    //VBoxVMInformationDlg::createInformationDlg(session(), machineWindowWrapper()->machineWindow());
+    //VBoxVMInformationDlg::createInformationDlg(session(), mainMachineWindow()->machineWindow());
 }
 
@@ -873,10 +885,10 @@
 void UIMachineLogic::sltClose()
 {
-    /* Do not process if window is missing! */
-    if (!machineWindowWrapper())
+    /* Do not process if window(s) missed! */
+    if (!machineWindowsCreated())
         return;
 
     /* Close machine window: */
-    machineWindowWrapper()->sltTryClose();
+    mainMachineWindow()->sltTryClose();
 }
 
@@ -1098,5 +1110,5 @@
         }
         /* Open VMM Dialog: */
-        VBoxMediaManagerDlg dlg(machineWindowWrapper()->machineWindow());
+        VBoxMediaManagerDlg dlg(mainMachineWindow()->machineWindow());
         dlg.setup(target.type, true /* select? */, true /* refresh? */, machine, currentId, true, usedImages);
         if (dlg.exec() == QDialog::Accepted)
@@ -1218,10 +1230,10 @@
 void UIMachineLogic::sltOpenNetworkAdaptersDialog()
 {
-    /* Do not process if window is missing! */
-    if (!machineWindowWrapper())
+    /* Do not process if window(s) missed! */
+    if (!machineWindowsCreated())
         return;
 
     /* Show network settings dialog: */
-    UINetworkAdaptersDialog dlg(machineWindowWrapper()->machineWindow(), session());
+    UINetworkAdaptersDialog dlg(mainMachineWindow()->machineWindow(), session());
     dlg.exec();
 }
@@ -1229,10 +1241,10 @@
 void UIMachineLogic::sltOpenSharedFoldersDialog()
 {
-    /* Do not process if window is missing! */
-    if (!machineWindowWrapper())
+    /* Do not process if window(s) missed! */
+    if (!machineWindowsCreated())
         return;
 
     /* Show shared folders settings dialog: */
-    UISharedFoldersDialog dlg(machineWindowWrapper()->machineWindow(), session());
+    UISharedFoldersDialog dlg(mainMachineWindow()->machineWindow(), session());
     dlg.exec();
 }
@@ -1248,6 +1260,6 @@
 void UIMachineLogic::sltInstallGuestAdditions()
 {
-    /* Do not process if window is missing! */
-    if (!machineWindowWrapper())
+    /* Do not process if window(s) missed! */
+    if (!machineWindowsCreated())
         return;
 
@@ -1453,28 +1465,28 @@
 
     PFNDBGGUICREATE pfnGuiCreate;
-    int rc = RTLdrGetSymbol (hLdrMod, "DBGGuiCreate", (void**) &pfnGuiCreate);
-    if (RT_SUCCESS (rc))
+    int rc = RTLdrGetSymbol(hLdrMod, "DBGGuiCreate", (void**)&pfnGuiCreate);
+    if (RT_SUCCESS(rc))
     {
         ISession *pISession = session().raw();
-        rc = pfnGuiCreate (pISession, &m_dbgGui, &m_dbgGuiVT);
-        if (RT_SUCCESS (rc))
-        {
-            if (DBGGUIVT_ARE_VERSIONS_COMPATIBLE (m_dbgGuiVT->u32Version, DBGGUIVT_VERSION) ||
+        rc = pfnGuiCreate(pISession, &m_dbgGui, &m_dbgGuiVT);
+        if (RT_SUCCESS(rc))
+        {
+            if (DBGGUIVT_ARE_VERSIONS_COMPATIBLE(m_dbgGuiVT->u32Version, DBGGUIVT_VERSION) ||
                 m_dbgGuiVT->u32EndVersion == m_dbgGuiVT->u32Version)
             {
-                m_dbgGuiVT->pfnSetParent (m_dbgGui, (QWidget*) machineWindowWrapper());
-                m_dbgGuiVT->pfnSetMenu (m_dbgGui, (QMenu*) actionsPool()->action(UIActionIndex_Menu_Debug));
+                m_dbgGuiVT->pfnSetParent(m_dbgGui, (QWidget*)mainMachineWindow());
+                m_dbgGuiVT->pfnSetMenu(m_dbgGui, (QMenu*)actionsPool()->action(UIActionIndex_Menu_Debug));
                 dbgAdjustRelativePos();
                 return true;
             }
 
-            LogRel (("DBGGuiCreate failed, incompatible versions (loaded %#x/%#x, expected %#x)\n",
-                     m_dbgGuiVT->u32Version, m_dbgGuiVT->u32EndVersion, DBGGUIVT_VERSION));
+            LogRel(("DBGGuiCreate failed, incompatible versions (loaded %#x/%#x, expected %#x)\n",
+                    m_dbgGuiVT->u32Version, m_dbgGuiVT->u32EndVersion, DBGGUIVT_VERSION));
         }
         else
-            LogRel (("DBGGuiCreate failed, rc=%Rrc\n", rc));
+            LogRel(("DBGGuiCreate failed, rc=%Rrc\n", rc));
     }
     else
-        LogRel (("RTLdrGetSymbol(,\"DBGGuiCreate\",) -> %Rrc\n", rc));
+        LogRel(("RTLdrGetSymbol(,\"DBGGuiCreate\",) -> %Rrc\n", rc));
 
     m_dbgGui = 0;
@@ -1497,5 +1509,5 @@
     if (m_dbgGui)
     {
-        QRect rct = machineWindowWrapper()->machineWindow()->frameGeometry();
+        QRect rct = mainMachineWindow()->machineWindow()->frameGeometry();
         m_dbgGuiVT->pfnAdjustRelativePos(m_dbgGui, rct.x(), rct.y(), rct.width(), rct.height());
     }
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h	(revision 26921)
@@ -62,5 +62,6 @@
     UIActionsPool* actionsPool() { return m_pActionsPool; }
     UIVisualStateType visualStateType() const { return m_visualStateType; }
-    UIMachineWindow* machineWindowWrapper() { return m_pMachineWindowWrapper; }
+    QList<UIMachineWindow*>& machineWindows() { return m_machineWindowsList; }
+    UIMachineWindow* mainMachineWindow() { return machineWindows().size() > 0 ? machineWindows()[0] : 0; }
 
     /* Maintenance getters/setters: */
@@ -79,9 +80,13 @@
     virtual ~UIMachineLogic();
 
+    /* Protected getters/setters: */
+    bool machineWindowsCreated() const { return m_fIsWindowsCreated; }
+    void setMachineWindowsCreated(bool fIsWindowsCreated) { m_fIsWindowsCreated = fIsWindowsCreated; }
+
     /* Protected wrappers: */
     CSession& session();
 
-    /* Protected setters: */
-    void setMachineWindowWrapper(UIMachineWindow *pMachineWindowWrapper) { m_pMachineWindowWrapper = pMachineWindowWrapper; }
+    /* Protected members: */
+    void addMachineWindow(UIMachineWindow *pMachineWindow);
 
     /* Prepare helpers: */
@@ -152,9 +157,10 @@
     UIActionsPool *m_pActionsPool;
     UIVisualStateType m_visualStateType;
-    UIMachineWindow *m_pMachineWindowWrapper;
+    QList<UIMachineWindow*> m_machineWindowsList;
 
     QActionGroup *m_pRunningActions;
     QActionGroup *m_pRunningOrPausedActions;
 
+    bool m_fIsWindowsCreated : 1;
     bool m_fIsPreventAutoStart : 1;
     bool m_fIsPreventAutoClose : 1;
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 26921)
@@ -114,5 +114,6 @@
                                      , bool bAccelerate2DVideo
 #endif
-                                     , UIVisualStateType visualStateType)
+                                     , UIVisualStateType visualStateType
+                                     , ulong uScreenId)
 {
     UIMachineView *view = 0;
@@ -125,5 +126,5 @@
                                            , bAccelerate2DVideo
 #endif
-                                          );
+                                           , uScreenId);
             break;
         case UIVisualStateType_Fullscreen:
@@ -133,5 +134,5 @@
                                                , bAccelerate2DVideo
 #endif
-                                              );
+                                               , uScreenId);
             break;
         case UIVisualStateType_Seamless:
@@ -141,5 +142,5 @@
                                            , bAccelerate2DVideo
 #endif
-                                          );
+                                           , uScreenId);
             break;
         default:
@@ -185,5 +186,4 @@
 }
 
-#include <QMainWindow>
 UIMachineView::UIMachineView(  UIMachineWindow *pMachineWindow
                              , VBoxDefs::RenderMode renderMode
@@ -191,5 +191,5 @@
                              , bool bAccelerate2DVideo
 #endif
-                            )
+                             , ulong uScreenId)
 // TODO_NEW_CORE: really think of if this is right
 //    : QAbstractScrollArea(((QMainWindow*)pMachineWindow->machineWindow())->centralWidget())
@@ -198,4 +198,5 @@
     , m_pMachineWindow(pMachineWindow)
     , m_mode(renderMode)
+    , m_uScreenId(uScreenId)
     , m_globalSettings(vboxGlobal().settings())
     , m_pFrameBuffer(0)
@@ -415,5 +416,5 @@
     {
         m_pFrameBuffer->AddRef();
-        display.SetFramebuffer(VBOX_VIDEO_PRIMARY_SCREEN, CFramebuffer(m_pFrameBuffer));
+        display.SetFramebuffer(m_uScreenId, CFramebuffer(m_pFrameBuffer));
     }
 }
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h	(revision 26921)
@@ -61,5 +61,6 @@
                                  , bool bAccelerate2DVideo
 #endif
-                                 , UIVisualStateType visualStateType);
+                                 , UIVisualStateType visualStateType
+                                 , ulong uScreenId);
     static void destroy(UIMachineView *pWhichView);
 
@@ -96,5 +97,5 @@
                   , bool bAccelerate2DVideo
 #endif
-    );
+                  , ulong uScreenId);
     virtual ~UIMachineView();
 
@@ -110,4 +111,5 @@
     int visibleHeight() const;
     VBoxDefs::RenderMode mode() const { return m_mode; }
+    ulong screenId() const { return m_uScreenId; }
     UIFrameBuffer* frameBuffer() const { return m_pFrameBuffer; }
     UIMachineWindow* machineWindowWrapper() const { return m_pMachineWindow; }
@@ -223,4 +225,5 @@
     UIMachineWindow *m_pMachineWindow;
     VBoxDefs::RenderMode m_mode;
+    ulong m_uScreenId;
     const VBoxGlobalSettings &m_globalSettings;
     UIFrameBuffer *m_pFrameBuffer;
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp	(revision 26921)
@@ -41,5 +41,5 @@
 //#include "UIMachineWindowSeamless.h"
 
-UIMachineWindow* UIMachineWindow::create(UIMachineLogic *pMachineLogic, UIVisualStateType visualStateType)
+UIMachineWindow* UIMachineWindow::create(UIMachineLogic *pMachineLogic, UIVisualStateType visualStateType, ulong uScreenId)
 {
     UIMachineWindow *window = 0;
@@ -47,12 +47,12 @@
     {
         case UIVisualStateType_Normal:
-            window = new UIMachineWindowNormal(pMachineLogic);
+            window = new UIMachineWindowNormal(pMachineLogic, uScreenId);
             break;
         case UIVisualStateType_Fullscreen:
-            window = new UIMachineWindowFullscreen(pMachineLogic);
+            window = new UIMachineWindowFullscreen(pMachineLogic, uScreenId);
             break;
         case UIVisualStateType_Seamless:
-            // window = new UIMachineWindowSeamless(pMachineLogic);
-            window = new UIMachineWindowNormal(pMachineLogic);
+            // window = new UIMachineWindowSeamless(pMachineLogic, uScreenId);
+            window = new UIMachineWindowNormal(pMachineLogic, uScreenId);
             break;
     }
@@ -87,7 +87,8 @@
 }
 
-UIMachineWindow::UIMachineWindow(UIMachineLogic *pMachineLogic)
+UIMachineWindow::UIMachineWindow(UIMachineLogic *pMachineLogic, ulong uScreenId)
     : m_pMachineLogic(pMachineLogic)
     , m_pMachineWindow(0)
+    , m_uScreenId(uScreenId)
     , m_pMachineViewContainer(0)
     , m_pTopSpacer(0)
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h	(revision 26921)
@@ -44,5 +44,5 @@
 
     /* Factory function to create required machine window child: */
-    static UIMachineWindow* create(UIMachineLogic *pMachineLogic, UIVisualStateType visualStateType);
+    static UIMachineWindow* create(UIMachineLogic *pMachineLogic, UIVisualStateType visualStateType, ulong uScreenId = 0);
     static void destroy(UIMachineWindow *pWhichWindow);
 
@@ -58,5 +58,5 @@
 
     /* Machine window constructor/destructor: */
-    UIMachineWindow(UIMachineLogic *pMachineLogic);
+    UIMachineWindow(UIMachineLogic *pMachineLogic, ulong uScreenId);
     virtual ~UIMachineWindow();
 
@@ -96,4 +96,7 @@
     QWidget *m_pMachineWindow;
 
+    /* Virtual screen number: */
+    ulong m_uScreenId;
+
     QGridLayout *m_pMachineViewContainer;
     QSpacerItem *m_pTopSpacer;
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 26921)
@@ -965,5 +965,5 @@
 qulonglong UISession::winId() const
 {
-    return uimachine()->machineLogic()->machineWindowWrapper()->machineWindow()->winId();
+    return uimachine()->machineLogic()->mainMachineWindow()->machineWindow()->winId();
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp	(revision 26921)
@@ -139,5 +139,5 @@
 {
     /* Do not prepare window if its ready: */
-    if (machineWindowWrapper())
+    if (mainMachineWindow())
         return;
 
@@ -149,5 +149,5 @@
 
     /* Create machine window: */
-    setMachineWindowWrapper(UIMachineWindow::create(this, visualStateType()));
+    addMachineWindow(UIMachineWindow::create(this, visualStateType()));
 
     /* If we are not started yet: */
@@ -165,5 +165,5 @@
         if (uisession()->isFirstTimeStarted())
         {
-            UIFirstRunWzd wzd(machineWindowWrapper()->machineWindow(), machine);
+            UIFirstRunWzd wzd(mainMachineWindow()->machineWindow(), machine);
             wzd.exec();
         }
@@ -176,5 +176,5 @@
         {
             vboxProblem().cannotStartMachine(console);
-            machineWindowWrapper()->machineWindow()->close();
+            mainMachineWindow()->machineWindow()->close();
             return;
         }
@@ -185,7 +185,7 @@
         /* Show "Starting/Restoring" progress dialog: */
         if (uisession()->isSaved())
-            vboxProblem().showModalProgressDialog(progress, machine.GetName(), machineWindowWrapper()->machineWindow(), 0);
+            vboxProblem().showModalProgressDialog(progress, machine.GetName(), mainMachineWindow()->machineWindow(), 0);
         else
-            vboxProblem().showModalProgressDialog(progress, machine.GetName(), machineWindowWrapper()->machineWindow());
+            vboxProblem().showModalProgressDialog(progress, machine.GetName(), mainMachineWindow()->machineWindow());
 
         /* Check for an progress failure */
@@ -193,5 +193,5 @@
         {
             vboxProblem().cannotStartMachine(progress);
-            machineWindowWrapper()->machineWindow()->close();
+            mainMachineWindow()->machineWindow()->close();
             return;
         }
@@ -206,5 +206,5 @@
         if (uisession()->isTurnedOff())
         {
-            machineWindowWrapper()->machineWindow()->close();
+            mainMachineWindow()->machineWindow()->close();
             return;
         }
@@ -228,5 +228,5 @@
 
             if (!vboxGlobal().isStartPausedEnabled())
-                machineWindowWrapper()->machineView()->pause (false);
+                mainMachineWindow()->machineView()->pause (false);
         }
 # endif
@@ -243,10 +243,9 @@
 {
     /* Do not cleanup machine window if it is not present: */
-    if (!machineWindowWrapper())
+    if (!mainMachineWindow())
         return;
 
     /* Cleanup machine window: */
-    UIMachineWindow::destroy(machineWindowWrapper());
-    setMachineWindowWrapper(0);
-}
-
+    UIMachineWindow::destroy(mainMachineWindow());
+}
+
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp	(revision 26921)
@@ -39,9 +39,9 @@
 
 UIMachineViewFullscreen::UIMachineViewFullscreen(  UIMachineWindow *pMachineWindow
-                                         , VBoxDefs::RenderMode renderMode
+                                                 , VBoxDefs::RenderMode renderMode
 #ifdef VBOX_WITH_VIDEOHWACCEL
-                                         , bool bAccelerate2DVideo
+                                                 , bool bAccelerate2DVideo
 #endif
-                                        )
+                                                 , ulong uMonitor)
     : UIMachineView(  pMachineWindow
                     , renderMode
@@ -49,5 +49,5 @@
                     , bAccelerate2DVideo
 #endif
-                   )
+                    , uMonitor)
     , m_bIsGuestAutoresizeEnabled(pMachineWindow->machineLogic()->actionsPool()->action(UIActionIndex_Toggle_GuestAutoresize)->isChecked())
     , m_fShouldWeDoResize(false)
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h	(revision 26921)
@@ -40,9 +40,9 @@
     /* Normal machine view constructor/destructor: */
     UIMachineViewFullscreen(  UIMachineWindow *pMachineWindow
-                        , VBoxDefs::RenderMode renderMode
+                            , VBoxDefs::RenderMode renderMode
 #ifdef VBOX_WITH_VIDEOHWACCEL
-                        , bool bAccelerate2DVideo
+                            , bool bAccelerate2DVideo
 #endif
-    );
+                            , ulong uMonitor);
     virtual ~UIMachineViewFullscreen();
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp	(revision 26921)
@@ -43,7 +43,7 @@
 #endif /* Q_WS_MAC */
 
-UIMachineWindowFullscreen::UIMachineWindowFullscreen(UIMachineLogic *pMachineLogic)
+UIMachineWindowFullscreen::UIMachineWindowFullscreen(UIMachineLogic *pMachineLogic, ulong uScreenId)
     : QIWithRetranslateUI<QIMainDialog>(0)
-    , UIMachineWindow(pMachineLogic)
+    , UIMachineWindow(pMachineLogic, uScreenId)
 {
     /* "This" is machine window: */
@@ -283,5 +283,6 @@
                                            , bAccelerate2DVideo
 #endif
-                                           , machineLogic()->visualStateType());
+                                           , machineLogic()->visualStateType()
+                                           , 0 /* Pass a primary screen id (0) for now! */);
 
     /* Add machine view into layout: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h	(revision 26921)
@@ -50,5 +50,5 @@
 
     /* Normal machine window constructor/destructor: */
-    UIMachineWindowFullscreen(UIMachineLogic *pMachineLogic);
+    UIMachineWindowFullscreen(UIMachineLogic *pMachineLogic, ulong uScreenId);
     virtual ~UIMachineWindowFullscreen();
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp	(revision 26921)
@@ -59,5 +59,5 @@
 
         /* Prepare normal machine window: */
-        prepareMachineWindow();
+        prepareMachineWindows();
 
         /* Initialization: */
@@ -112,9 +112,15 @@
 }
 
-void UIMachineLogicNormal::prepareMachineWindow()
-{
-    /* Do not prepare window if its ready: */
-    if (machineWindowWrapper())
+void UIMachineLogicNormal::prepareMachineWindows()
+{
+    /* Get monitor count: */
+    ulong uMonitorCount = session().GetMachine().GetMonitorCount();
+
+    /* Do not create window(s) if created already: */
+    if ((ulong)machineWindows().size() == uMonitorCount)
         return;
+
+    /* List should not be filled partially: */
+    AssertMsg(machineWindows().size() == 0, ("Windows list is filled partially, something broken!\n"));
 
 #ifdef Q_WS_MAC
@@ -124,6 +130,10 @@
 #endif /* Q_WS_MAC */
 
-    /* Create machine window: */
-    setMachineWindowWrapper(UIMachineWindow::create(this, visualStateType()));
+    /* Create machine window(s): */
+    for (ulong uScreenId = 0; uScreenId < uMonitorCount; ++ uScreenId)
+        addMachineWindow(UIMachineWindow::create(this, visualStateType(), uScreenId));
+
+    /* Notify others about machine window(s) created: */
+    setMachineWindowsCreated(true);
 
     /* If we are not started yet: */
@@ -141,5 +151,5 @@
         if (uisession()->isFirstTimeStarted())
         {
-            UIFirstRunWzd wzd(machineWindowWrapper()->machineWindow(), machine);
+            UIFirstRunWzd wzd(mainMachineWindow()->machineWindow(), machine);
             wzd.exec();
         }
@@ -148,5 +158,7 @@
         CProgress progress = vboxGlobal().isStartPausedEnabled() || vboxGlobal().isDebuggerAutoShowEnabled() ?
                              console.PowerUpPaused() : console.PowerUp();
-        /* Check for an immediate failure */
+
+#if 0 // TODO: Check immediate failure!
+        /* Check for an immediate failure: */
         if (!console.isOk())
         {
@@ -158,11 +170,13 @@
         /* Disable auto-closure because we want to have a chance to show the error dialog on startup failure: */
         setPreventAutoClose(true);
+#endif
 
         /* Show "Starting/Restoring" progress dialog: */
         if (uisession()->isSaved())
-            vboxProblem().showModalProgressDialog(progress, machine.GetName(), machineWindowWrapper()->machineWindow(), 0);
+            vboxProblem().showModalProgressDialog(progress, machine.GetName(), mainMachineWindow()->machineWindow(), 0);
         else
-            vboxProblem().showModalProgressDialog(progress, machine.GetName(), machineWindowWrapper()->machineWindow());
-
+            vboxProblem().showModalProgressDialog(progress, machine.GetName(), mainMachineWindow()->machineWindow());
+
+#if 0 // TODO: Check immediate failure!
         /* Check for an progress failure */
         if (progress.GetResultCode() != 0)
@@ -173,7 +187,4 @@
         }
 
-        /* Process pending events: */
-        qApp->processEvents();
-
         /* Enable auto-closure again: */
         setPreventAutoClose(false);
@@ -185,4 +196,5 @@
             return;
         }
+#endif
 
 #if 0 // TODO: Rework debugger logic!
@@ -219,10 +231,10 @@
 {
     /* Do not cleanup machine window if it is not present: */
-    if (!machineWindowWrapper())
+    if (!machineWindowsCreated())
         return;
 
     /* Cleanup normal machine window: */
-    UIMachineWindow::destroy(machineWindowWrapper());
-    setMachineWindowWrapper(0);
-}
-
+    foreach (UIMachineWindow *pMachineWindow, machineWindows())
+        UIMachineWindow::destroy(pMachineWindow);
+}
+
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.h	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.h	(revision 26921)
@@ -53,5 +53,5 @@
     /* Prepare helpers: */
     void prepareActionConnections();
-    void prepareMachineWindow();
+    void prepareMachineWindows();
 
     /* Cleanup helpers: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp	(revision 26921)
@@ -43,5 +43,5 @@
                                          , bool bAccelerate2DVideo
 #endif
-                                        )
+                                         , ulong uMonitor)
     : UIMachineView(  pMachineWindow
                     , renderMode
@@ -49,5 +49,5 @@
                     , bAccelerate2DVideo
 #endif
-                   )
+                    , uMonitor)
     , m_bIsGuestAutoresizeEnabled(pMachineWindow->machineLogic()->actionsPool()->action(UIActionIndex_Toggle_GuestAutoresize)->isChecked())
     , m_fShouldWeDoResize(false)
@@ -126,5 +126,5 @@
 
             /* Send new size-hint to the guest: */
-            session().GetConsole().GetDisplay().SetVideoModeHint(newSize.width(), newSize.height(), 0, 0);
+            session().GetConsole().GetDisplay().SetVideoModeHint(newSize.width(), newSize.height(), 0, screenId());
         }
         /* We had requested resize now, rejecting accident requests: */
@@ -318,5 +318,5 @@
 
             /* Report to the VM thread that we finished resizing */
-            session().GetConsole().GetDisplay().ResizeCompleted(0);
+            session().GetConsole().GetDisplay().ResizeCompleted(screenId());
 
             setMachineWindowResizeIgnored(oldIgnoreMainwndResize);
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h	(revision 26921)
@@ -44,5 +44,5 @@
                         , bool bAccelerate2DVideo
 #endif
-    );
+                        , ulong uMonitor);
     virtual ~UIMachineViewNormal();
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp	(revision 26921)
@@ -42,7 +42,7 @@
 #include "QIHotKeyEdit.h"
 
-UIMachineWindowNormal::UIMachineWindowNormal(UIMachineLogic *pMachineLogic)
+UIMachineWindowNormal::UIMachineWindowNormal(UIMachineLogic *pMachineLogic, ulong uScreenId)
     : QIWithRetranslateUI<QIMainDialog>(0)
-    , UIMachineWindow(pMachineLogic)
+    , UIMachineWindow(pMachineLogic, uScreenId)
     , m_pIndicatorsPool(new UIIndicatorsPool(pMachineLogic->uisession()->session(), this))
     , m_pIdleTimer(0)
@@ -447,5 +447,6 @@
                                            , bAccelerate2DVideo
 #endif
-                                           , machineLogic()->visualStateType());
+                                           , machineLogic()->visualStateType()
+                                           , m_uScreenId);
 
     /* Add machine view into layout: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h	(revision 26921)
@@ -48,5 +48,5 @@
 
     /* Normal machine window constructor/destructor: */
-    UIMachineWindowNormal(UIMachineLogic *pMachineLogic);
+    UIMachineWindowNormal(UIMachineLogic *pMachineLogic, ulong uScreenId);
     virtual ~UIMachineWindowNormal();
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsDisplay.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsDisplay.cpp	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsDisplay.cpp	(revision 26921)
@@ -7,5 +7,5 @@
 
 /*
- * Copyright (C) 2008-2009 Sun Microsystems, Inc.
+ * Copyright (C) 2008-2010 Sun Microsystems, Inc.
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -56,15 +56,18 @@
     const uint MinVRAM = sys.GetMinGuestVRAM();
     const uint MaxVRAM = sys.GetMaxGuestVRAM();
+    const uint MinMonitors = 1;
+    const uint MaxMonitors = sys.GetMaxGuestMonitors();
 
     /* Setup validators */
     mLeMemory->setValidator (new QIntValidator (MinVRAM, MaxVRAM, this));
+    mLeMonitors->setValidator (new QIntValidator (MinMonitors, MaxMonitors, this));
     mLeVRDPPort->setValidator (new QRegExpValidator (QRegExp ("(([0-9]{1,5}(\\-[0-9]{1,5}){0,1}),)*([0-9]{1,5}(\\-[0-9]{1,5}){0,1})"), this));
     mLeVRDPTimeout->setValidator (new QIntValidator (this));
 
     /* Setup connections */
-    connect (mSlMemory, SIGNAL (valueChanged (int)),
-             this, SLOT (valueChangedVRAM (int)));
-    connect (mLeMemory, SIGNAL (textChanged (const QString&)),
-             this, SLOT (textChangedVRAM (const QString&)));
+    connect (mSlMemory, SIGNAL (valueChanged (int)), this, SLOT (valueChangedVRAM (int)));
+    connect (mLeMemory, SIGNAL (textChanged (const QString&)), this, SLOT (textChangedVRAM (const QString&)));
+    connect (mSlMonitors, SIGNAL (valueChanged (int)), this, SLOT (valueChangedMonitors (int)));
+    connect (mLeMonitors, SIGNAL (textChanged (const QString&)), this, SLOT (textChangedMonitors (const QString&)));
 
     /* Setup initial values */
@@ -72,4 +75,7 @@
     mSlMemory->setSingleStep (mSlMemory->pageStep() / 4);
     mSlMemory->setTickInterval (mSlMemory->pageStep());
+    mSlMonitors->setPageStep (1);
+    mSlMonitors->setSingleStep (1);
+    mSlMonitors->setTickInterval (1);
     /* Setup the scale so that ticks are at page step boundaries */
     mSlMemory->setMinimum ((MinVRAM / mSlMemory->pageStep()) * mSlMemory->pageStep());
@@ -80,8 +86,13 @@
     mSlMemory->setWarningHint (1, needMBytes);
     mSlMemory->setOptimalHint (needMBytes, MaxVRAM);
+    mSlMonitors->setMinimum (MinMonitors);
+    mSlMonitors->setMaximum (MaxMonitors);
+    mSlMonitors->setSnappingEnabled (true);
     /* Limit min/max. size of QLineEdit */
     mLeMemory->setFixedWidthByText (QString().fill ('8', 4));
-    /* Ensure mLeMemory value and validation is updated */
+    mLeMonitors->setFixedWidthByText (QString().fill ('8', 4));
+    /* Ensure value and validation is updated */
     valueChangedVRAM (mSlMemory->value());
+    valueChangedMonitors (mSlMonitors->value());
     /* Setup VRDP widget */
     mCbVRDPMethod->insertItem (0, ""); /* KVRDPAuthType_Null */
@@ -115,4 +126,7 @@
     mSlMemory->setValue (mMachine.GetVRAMSize());
 
+    /* Monitors Count */
+    mSlMonitors->setValue (mMachine.GetMonitorCount());
+
     /* 3D Acceleration */
     bool isAccelerationSupported = vboxGlobal().virtualBox().GetHost()
@@ -147,4 +161,7 @@
     /* Memory Size */
     mMachine.SetVRAMSize (mSlMemory->value());
+
+    /* Monitors Count */
+    mMachine.SetMonitorCount (mSlMonitors->value());
 
     /* 3D Acceleration */
@@ -223,5 +240,7 @@
     setTabOrder (mTwDisplay->focusProxy(), mSlMemory);
     setTabOrder (mSlMemory, mLeMemory);
-    setTabOrder (mLeMemory, mCb3D);
+    setTabOrder (mLeMemory, mSlMonitors);
+    setTabOrder (mSlMonitors, mLeMonitors);
+    setTabOrder (mLeMonitors, mCb3D);
 #ifdef VBOX_WITH_VIDEOHWACCEL
     setTabOrder (mCb3D, mCb2DVideo);
@@ -243,4 +262,6 @@
     mLbMemoryMin->setText (tr ("<qt>%1&nbsp;MB</qt>").arg (sys.GetMinGuestVRAM()));
     mLbMemoryMax->setText (tr ("<qt>%1&nbsp;MB</qt>").arg (sys.GetMaxGuestVRAM()));
+    mLbMonitorsMin->setText (tr ("<qt>%1</qt>").arg (1));
+    mLbMonitorsMax->setText (tr ("<qt>%1</qt>").arg (sys.GetMaxGuestMonitors()));
 
     mCbVRDPMethod->setItemText (0,
@@ -262,2 +283,11 @@
 }
 
+void VBoxVMSettingsDisplay::valueChangedMonitors (int aVal)
+{
+    mLeMonitors->setText (QString().setNum (aVal));
+}
+
+void VBoxVMSettingsDisplay::textChangedMonitors (const QString &aText)
+{
+    mSlMonitors->setValue (aText.toInt());
+}
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsDisplay.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsDisplay.h	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsDisplay.h	(revision 26921)
@@ -6,5 +6,5 @@
 
 /*
- * Copyright (C) 2008-2009 Sun Microsystems, Inc.
+ * Copyright (C) 2008-2010 Sun Microsystems, Inc.
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -57,4 +57,6 @@
     void valueChangedVRAM (int aVal);
     void textChangedVRAM (const QString &aText);
+    void valueChangedMonitors (int aVal);
+    void textChangedMonitors (const QString &aText);
 
 private:
Index: trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsDisplay.ui
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsDisplay.ui	(revision 26920)
+++ trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsDisplay.ui	(revision 26921)
@@ -4,5 +4,5 @@
  VBox frontends: Qt4 GUI (&quot;VirtualBox&quot;):
 
-     Copyright (C) 2008-2009 Sun Microsystems, Inc.
+     Copyright (C) 2008-2010 Sun Microsystems, Inc.
 
      This file is part of VirtualBox Open Source Edition (OSE), as
@@ -152,14 +152,110 @@
           </item>
           <item row="2" column="0">
-           <widget class="QLabel" name="mLbOptions">
-            <property name="text">
-             <string>Extended Features:</string>
+           <widget class="QLabel" name="mLbMonitors">
+            <property name="text">
+             <string>Mo&amp;nitor Count:</string>
             </property>
             <property name="alignment">
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
             </property>
-           </widget>
-          </item>
-          <item row="2" column="1" colspan="2">
+            <property name="buddy">
+             <cstring>mLeMonitors</cstring>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="1" rowspan="2">
+           <layout class="QVBoxLayout" name="mLtMonitorsSlider">
+            <property name="spacing">
+             <number>0</number>
+            </property>
+            <item>
+             <widget class="QIAdvancedSlider" name="mSlMonitors">
+              <property name="whatsThis">
+               <string>Controls the amount of virtual monitors provided to the virtual machine.</string>
+              </property>
+              <property name="orientation">
+               <enum>Qt::Horizontal</enum>
+              </property>
+              <property name="tickPosition">
+               <enum>QSlider::TicksBelow</enum>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <layout class="QHBoxLayout" name="mLtMonitorsLegend">
+              <item>
+               <widget class="QLabel" name="mLbMonitorsMin">
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <spacer name="mSpHor2">
+                <property name="orientation">
+                 <enum>Qt::Horizontal</enum>
+                </property>
+                <property name="sizeHint" stdset="0">
+                 <size>
+                  <width>0</width>
+                  <height>0</height>
+                 </size>
+                </property>
+               </spacer>
+              </item>
+              <item>
+               <widget class="QLabel" name="mLbMonitorsMax">
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+                <property name="alignment">
+                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </item>
+           </layout>
+          </item>
+          <item row="2" column="2">
+           <layout class="QHBoxLayout" name="mLtMonitorsSize">
+            <property name="spacing">
+             <number>4</number>
+            </property>
+            <item>
+             <widget class="QILineEdit" name="mLeMonitors">
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
+              <property name="whatsThis">
+               <string>Controls the amount of virtual monitors provided to the virtual machine.</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="mLbMonitorsUnit"/>
+            </item>
+           </layout>
+          </item>
+		  <item row="4" column="0">
+           <widget class="QLabel" name="mLbOptions">
+            <property name="text">
+             <string>Extended Features:</string>
+            </property>
+            <property name="alignment">
+             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+            </property>
+           </widget>
+          </item>
+          <item row="4" column="1" colspan="2">
            <widget class="QCheckBox" name="mCb3D">
             <property name="sizePolicy">
@@ -177,5 +273,5 @@
            </widget>
           </item>
-          <item row="3" column="1" colspan="2">
+          <item row="5" column="1" colspan="2">
            <widget class="QCheckBox" name="mCb2DVideo">
             <property name="sizePolicy">
@@ -257,5 +353,5 @@
              </property>
              <item row="1" column="0" rowspan="3">
-              <spacer name="mSpHor2">
+              <spacer name="mSpHor3">
                <property name="orientation">
                 <enum>Qt::Horizontal</enum>
