Index: trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 27335)
@@ -377,4 +377,5 @@
 	src/runtime/UIMachineLogic.h \
 	src/runtime/UIMachineView.h \
+	src/runtime/UIMultiScreenLayout.h \
 	src/runtime/normal/UIMachineLogicNormal.h \
 	src/runtime/normal/UIMachineWindowNormal.h \
@@ -503,8 +504,6 @@
 	src/runtime/UIIndicatorsPool.cpp \
 	src/runtime/UIFrameBuffer.cpp \
-	src/runtime/UIFrameBufferDirectDraw.cpp \
 	src/runtime/UIFrameBufferQGL.cpp \
 	src/runtime/UIFrameBufferQImage.cpp \
-	src/runtime/UIFrameBufferQuartz2D.cpp \
 	src/runtime/UIFrameBufferSDL.cpp \
 	src/runtime/UIMachine.cpp \
@@ -513,4 +512,5 @@
 	src/runtime/UIMachineView.cpp \
 	src/runtime/UIMachineMenuBar.cpp \
+	src/runtime/UIMultiScreenLayout.cpp \
 	src/runtime/normal/UIMachineLogicNormal.cpp \
 	src/runtime/normal/UIMachineWindowNormal.cpp \
@@ -522,5 +522,8 @@
 	src/runtime/seamless/UIMachineWindowSeamless.cpp \
 	src/runtime/seamless/UIMachineViewSeamless.cpp
+VirtualBox_SOURCES.win += \
+	src/runtime/UIFrameBufferDirectDraw.cpp
 VirtualBox_SOURCES.darwin += \
+	src/runtime/UIFrameBufferQuartz2D.cpp \
 	src/darwin/UIAbstractDockIconPreview.cpp \
 	src/darwin/UICocoaDockIconPreview.mm
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxDefs.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxDefs.cpp	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxDefs.cpp	(revision 27335)
@@ -31,4 +31,5 @@
 const char* VBoxDefs::GUI_Fullscreen = "GUI/Fullscreen";
 const char* VBoxDefs::GUI_Seamless = "GUI/Seamless";
+const char* VBoxDefs::GUI_VirtualScreenToHostScreen = "GUI/VirtualScreenToHostScreen";
 const char* VBoxDefs::GUI_AutoresizeGuest = "GUI/AutoresizeGuest";
 const char* VBoxDefs::GUI_FirstRun = "GUI/FirstRun";
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxDefs.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxDefs.h	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxDefs.h	(revision 27335)
@@ -149,4 +149,5 @@
     static const char* GUI_Fullscreen;
     static const char* GUI_Seamless;
+    static const char* GUI_VirtualScreenToHostScreen;
     static const char* GUI_AutoresizeGuest;
     static const char* GUI_FirstRun;
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionsPool.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionsPool.cpp	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionsPool.cpp	(revision 27335)
@@ -508,4 +508,24 @@
         setText(VBoxGlobal::insertKeyToActionText(UIActionsPool::tr("&Close..." ), "Q"));
         setStatusTip(UIActionsPool::tr("Close the virtual machine"));
+    }
+};
+
+class MenuViewAction : public UIMenuAction
+{
+    Q_OBJECT;
+
+public:
+
+    MenuViewAction(QObject *pParent)
+        : UIMenuAction(pParent)
+    {
+        retranslateUi();
+    }
+
+protected:
+
+    void retranslateUi()
+    {
+        menu()->setTitle(UIActionsPool::tr("&View"));
     }
 };
@@ -1120,4 +1140,7 @@
         delete m_actionsPool[UIActionIndex_Menu_Machine];
     m_actionsPool[UIActionIndex_Menu_Machine] = new MenuMachineAction(this);
+    if (m_actionsPool[UIActionIndex_Menu_View])
+        delete m_actionsPool[UIActionIndex_Menu_View];
+    m_actionsPool[UIActionIndex_Menu_View] = new MenuViewAction(this);
     if (m_actionsPool[UIActionIndex_Menu_MouseIntegration])
         delete m_actionsPool[UIActionIndex_Menu_MouseIntegration];
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionsPool.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionsPool.h	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionsPool.h	(revision 27335)
@@ -77,4 +77,7 @@
     UIActionIndex_Simple_Close,
 
+    /* "View" menu actions: */
+    UIActionIndex_Menu_View,
+
     /* "Devices" menu actions: */
     UIActionIndex_Menu_Devices,
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineDefs.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineDefs.h	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineDefs.h	(revision 27335)
@@ -68,4 +68,15 @@
 };
 
+/* Main menu enum: */
+enum UIMainMenuType
+{
+    UIMainMenuType_Machine = RT_BIT(0),
+    UIMainMenuType_Devices = RT_BIT(1),
+    UIMainMenuType_View    = RT_BIT(2),
+    UIMainMenuType_Debug   = RT_BIT(3),
+    UIMainMenuType_Help    = RT_BIT(4),
+    UIMainMenuType_All     = 0xFF
+};
+
 #endif // __UIMachineDefs_h__
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h	(revision 27335)
@@ -67,4 +67,5 @@
     /* Main getters/setters: */
     UISession* uisession() const { return m_pSession; }
+    CSession& session();
     UIActionsPool* actionsPool() const { return m_pActionsPool; }
     UIVisualStateType visualStateType() const { return m_visualStateType; }
@@ -93,7 +94,4 @@
     bool isMachineWindowsCreated() const { return m_fIsWindowsCreated; }
     void setMachineWindowsCreated(bool fIsWindowsCreated) { m_fIsWindowsCreated = fIsWindowsCreated; }
-
-    /* Protected wrappers: */
-    CSession& session();
 
     /* Protected members: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineMenuBar.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineMenuBar.cpp	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineMenuBar.cpp	(revision 27335)
@@ -39,5 +39,5 @@
 }
 
-QMenu* UIMachineMenuBar::createMenu(UIActionsPool *pActionsPool)
+QMenu* UIMachineMenuBar::createMenu(UIActionsPool *pActionsPool, UIMainMenuType fOptions /* = UIMainMenuType_All */)
 {
     /* Create empty menu: */
@@ -45,5 +45,5 @@
 
     /* Fill menu with prepared items: */
-    foreach (QMenu *pSubMenu, prepareSubMenus(pActionsPool))
+    foreach (QMenu *pSubMenu, prepareSubMenus(pActionsPool, fOptions))
         pMenu->addMenu(pSubMenu);
 
@@ -52,5 +52,5 @@
 }
 
-QMenuBar* UIMachineMenuBar::createMenuBar(UIActionsPool *pActionsPool)
+QMenuBar* UIMachineMenuBar::createMenuBar(UIActionsPool *pActionsPool, UIMainMenuType fOptions /* = UIMainMenuType_All */)
 {
     /* Create empty menubar: */
@@ -58,5 +58,5 @@
 
     /* Fill menubar with prepared items: */
-    foreach (QMenu *pSubMenu, prepareSubMenus(pActionsPool))
+    foreach (QMenu *pSubMenu, prepareSubMenus(pActionsPool, fOptions))
         pMenuBar->addMenu(pSubMenu);
 
@@ -65,5 +65,5 @@
 }
 
-QList<QMenu*> UIMachineMenuBar::prepareSubMenus(UIActionsPool *pActionsPool)
+QList<QMenu*> UIMachineMenuBar::prepareSubMenus(UIActionsPool *pActionsPool, UIMainMenuType fOptions /* = UIMainMenuType_All */)
 {
     /* Create empty submenu list: */
@@ -71,16 +71,30 @@
 
     /* Machine submenu: */
-    QMenu *pMenuMachine = pActionsPool->action(UIActionIndex_Menu_Machine)->menu();
-    prepareMenuMachine(pMenuMachine, pActionsPool);
-    preparedSubMenus << pMenuMachine;
+    if (fOptions & UIMainMenuType_Machine)
+    {
+        QMenu *pMenuMachine = pActionsPool->action(UIActionIndex_Menu_Machine)->menu();
+        prepareMenuMachine(pMenuMachine, pActionsPool);
+        preparedSubMenus << pMenuMachine;
+    }
+
+    /* View submenu: */
+    if (fOptions & UIMainMenuType_View)
+    {
+        QMenu *pMenuView = pActionsPool->action(UIActionIndex_Menu_View)->menu();
+        preparedSubMenus << pMenuView;
+    }
 
     /* Devices submenu: */
-    QMenu *pMenuDevices = pActionsPool->action(UIActionIndex_Menu_Devices)->menu();
-    prepareMenuDevices(pMenuDevices, pActionsPool);
-    preparedSubMenus << pMenuDevices;
+    if (fOptions & UIMainMenuType_Devices)
+    {
+        QMenu *pMenuDevices = pActionsPool->action(UIActionIndex_Menu_Devices)->menu();
+        prepareMenuDevices(pMenuDevices, pActionsPool);
+        preparedSubMenus << pMenuDevices;
+    }
 
 #ifdef VBOX_WITH_DEBUGGER_GUI
     /* Debug submenu: */
-    if (vboxGlobal().isDebuggerEnabled())
+    if (   fOptions & UIMainMenuType_Debug
+        && vboxGlobal().isDebuggerEnabled())
     {
         QMenu *pMenuDebug = pActionsPool->action(UIActionIndex_Menu_Debug)->menu();
@@ -91,7 +105,10 @@
 
     /* Help submenu: */
-    QMenu *pMenuHelp = pActionsPool->action(UIActionIndex_Menu_Help)->menu();
-    prepareMenuHelp(pMenuHelp, pActionsPool);
-    preparedSubMenus << pMenuHelp;
+    if (fOptions & UIMainMenuType_Help)
+    {
+        QMenu *pMenuHelp = pActionsPool->action(UIActionIndex_Menu_Help)->menu();
+        prepareMenuHelp(pMenuHelp, pActionsPool);
+        preparedSubMenus << pMenuHelp;
+    }
 
     /* Return a list of prepared submenus: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineMenuBar.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineMenuBar.h	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineMenuBar.h	(revision 27335)
@@ -24,4 +24,7 @@
 #define __UIMachineMenuBar_h__
 
+/* Local includes */
+#include "UIMachineDefs.h"
+
 /* Global includes */
 #include <QList>
@@ -37,13 +40,12 @@
 {
 public:
-
     UIMachineMenuBar();
 
-    QMenu* createMenu(UIActionsPool *pActionsPool);
-    QMenuBar* createMenuBar(UIActionsPool *pActionsPool);
+    QMenu* createMenu(UIActionsPool *pActionsPool, UIMainMenuType fOptions = UIMainMenuType_All);
+    QMenuBar* createMenuBar(UIActionsPool *pActionsPool, UIMainMenuType fOptions = UIMainMenuType_All);
 
 protected:
 
-    QList<QMenu*> prepareSubMenus(UIActionsPool *pActionsPool);
+    QList<QMenu*> prepareSubMenus(UIActionsPool *pActionsPool, UIMainMenuType fOptions = UIMainMenuType_All);
     void prepareMenuMachine(QMenu *pMenu, UIActionsPool *pActionsPool);
     void prepareMenuDevices(QMenu *pMenu, UIActionsPool *pActionsPool);
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 27335)
@@ -443,4 +443,20 @@
 }
 #endif
+
+void UIMachineView::updateSliders()
+{
+    QSize p = viewport()->size();
+    QSize m = maximumViewportSize();
+
+    QSize v = QSize(frameBuffer()->width(), frameBuffer()->height());
+    /* No scroll bars needed: */
+    if (m.expandedTo(v) == m)
+        p = m;
+
+    horizontalScrollBar()->setRange(0, v.width() - p.width());
+    verticalScrollBar()->setRange(0, v.height() - p.height());
+    horizontalScrollBar()->setPageStep(p.width());
+    verticalScrollBar()->setPageStep(p.height());
+}
 
 void UIMachineView::prepareFrameBuffer()
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h	(revision 27335)
@@ -131,5 +131,5 @@
     virtual void calculateDesktopGeometry() = 0;
     virtual void maybeRestrictMinimumSize() = 0;
-    virtual void updateSliders() =  0;
+    virtual void updateSliders();
 
 #ifdef Q_WS_MAC
@@ -328,4 +328,4 @@
 };
 
-#endif // !___UIMachineViewNormal_h___
-
+#endif // !___UIMachineView_h___
+
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h	(revision 27335)
@@ -57,4 +57,6 @@
     CSession& session() const;
 
+    virtual void reshow() {}
+
 protected:
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp	(revision 27335)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp	(revision 27335)
@@ -0,0 +1,163 @@
+/* $Id$ */
+/** @file
+ *
+ * VBox frontends: Qt GUI ("VirtualBox"):
+ * UIMultiScreenLayout class implementation
+ */
+
+/*
+ * Copyright (C) 2010 Sun Microsystems, Inc.
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
+ * Clara, CA 95054 USA or visit http://www.sun.com if you need
+ * additional information or have any questions.
+ */
+
+/* Local includes */
+#include "UIMultiScreenLayout.h"
+#include "COMDefs.h"
+#include "UIActionsPool.h"
+#include "UIMachineLogic.h"
+
+/* Global includes */
+#include <QApplication>
+#include <QDesktopWidget>
+#include <QMap>
+#include <QMenu>
+
+UIMultiScreenLayout::UIMultiScreenLayout(UIMachineLogic *pMachineLogic)
+    : m_pMachineLogic(pMachineLogic)
+    , m_pScreenMap(new QMap<int, int>())
+{
+    CMachine machine = m_pMachineLogic->session().GetMachine();
+    /* Get host/guest monitor count: */
+#if (QT_VERSION >= 0x040600)
+    m_cHostScreens = QApplication::desktop()->screenCount();
+#else /* (QT_VERSION >= 0x040600) */
+    m_cHostScreens = QApplication::desktop()->numScreens();
+#endif /* !(QT_VERSION >= 0x040600) */
+    m_cGuestScreens = machine.GetMonitorCount();
+}
+
+UIMultiScreenLayout::~UIMultiScreenLayout()
+{
+    delete m_pScreenMap;
+}
+
+void UIMultiScreenLayout::initialize(QMenu *pMenu)
+{
+    for (int i = 0; i < m_cGuestScreens; ++i)
+    {
+        QMenu *pScreenMenu = pMenu->addMenu(tr("Virtual Screen %1").arg(i + 1));
+        QActionGroup *pScreenGroup = new QActionGroup(pScreenMenu);
+        pScreenGroup->setExclusive(true);
+        connect(pScreenGroup, SIGNAL(triggered(QAction*)),
+                this, SLOT(sltScreenLayoutChanged(QAction*)));
+        for (int a = 0; a < m_cHostScreens; ++a)
+        {
+            QAction *pAction = pScreenGroup->addAction(tr("Use Host Screen %1").arg(a + 1));
+            pAction->setCheckable(true);
+            pAction->setData(RT_MAKE_U32(i, a));
+        }
+        pScreenMenu->addActions(pScreenGroup->actions());
+    }
+}
+
+void UIMultiScreenLayout::update()
+{
+    CMachine machine = m_pMachineLogic->session().GetMachine();
+    /* Make a pool of available host screens. */
+    QList<int> availableScreens;
+    for (int i = 0; i < m_cHostScreens; ++i)
+        availableScreens << i;
+    /* Load all combinations stored in the settings file. We have to make sure
+     * they are valid, which means there have to be unique combinations and all
+     * guests screens need there own host screen. */
+    for (int i = 0; i < m_cGuestScreens; ++i)
+    {
+        QString strTest = machine.GetExtraData(QString("%1%2").arg(VBoxDefs::GUI_VirtualScreenToHostScreen).arg(i));
+        bool fOk;
+        int cScreen = strTest.toInt(&fOk);
+        /* Check if valid: */
+        if (!(   fOk /* Valid data */
+                 && cScreen >= 0 && cScreen < m_cHostScreens /* In the host screen bounds? */
+                 && m_pScreenMap->key(cScreen, -1) == -1)) /* Not taken already? */
+            /* If not, use one from the available screens */
+            cScreen = availableScreens.first();
+        m_pScreenMap->insert(i, cScreen);
+        /* Remove the current set screen from the list of available screens. */
+        availableScreens.removeOne(cScreen);
+    }
+
+    QList<QAction*> actions = m_pMachineLogic->actionsPool()->action(UIActionIndex_Menu_View)->menu()->actions();
+    for (int i = 0; i < m_pScreenMap->size(); ++i)
+    {
+        int hostScreen = m_pScreenMap->value(i);
+        QList<QAction*> actions1 = actions.at(i)->menu()->actions();
+        for (int w = 0; w < actions1.size(); ++w)
+        {
+            QAction *pTmpAction = actions1.at(w);
+            pTmpAction->blockSignals(true);
+            pTmpAction->setChecked(RT_HIWORD(pTmpAction->data().toInt()) == hostScreen);
+            pTmpAction->blockSignals(false);
+        }
+    }
+}
+
+int UIMultiScreenLayout::hostScreenCount() const
+{
+    return m_cHostScreens;
+}
+
+int UIMultiScreenLayout::guestScreenCount() const
+{
+    return m_cGuestScreens;
+}
+
+int UIMultiScreenLayout::hostScreenForGuestScreen(int screenId) const
+{
+    return m_pScreenMap->value(screenId, 0);
+}
+
+void UIMultiScreenLayout::sltScreenLayoutChanged(QAction *pAction)
+{
+    int a = pAction->data().toInt();
+    int cGuestScreen = RT_LOWORD(a);
+    int cHostScreen = RT_HIWORD(a);
+
+    CMachine machine = m_pMachineLogic->session().GetMachine();
+    /* Search for the virtual screen which is currently displayed on the
+     * requested host screen. When there is one found, we swap both. */
+    int r = m_pScreenMap->key(cHostScreen, -1);
+    if (r != -1)
+        m_pScreenMap->insert(r, m_pScreenMap->value(cGuestScreen));
+    /* Set the new host screen */
+    m_pScreenMap->insert(cGuestScreen, cHostScreen);
+
+    QList<QAction*> actions = m_pMachineLogic->actionsPool()->action(UIActionIndex_Menu_View)->menu()->actions();
+    /* Update the settings. */
+    for (int i = 0; i < m_cGuestScreens; ++i)
+    {
+        int hostScreen = m_pScreenMap->value(i);
+        machine.SetExtraData(QString("%1%2").arg(VBoxDefs::GUI_VirtualScreenToHostScreen).arg(i), QString::number(hostScreen));
+        QList<QAction*> actions1 = actions.at(i)->menu()->actions();
+        for (int w = 0; w < actions1.size(); ++w)
+        {
+            QAction *pTmpAction = actions1.at(w);
+            pTmpAction->blockSignals(true);
+            pTmpAction->setChecked(RT_HIWORD(pTmpAction->data().toInt()) == hostScreen);
+            pTmpAction->blockSignals(false);
+        }
+    }
+
+    emit screenLayoutChanged();
+}
+
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.h	(revision 27335)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.h	(revision 27335)
@@ -0,0 +1,68 @@
+/** @file
+ *
+ * VBox frontends: Qt GUI ("VirtualBox"):
+ * UIMultiScreenLayout class declaration
+ */
+
+/*
+ * Copyright (C) 2010 Sun Microsystems, Inc.
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
+ * Clara, CA 95054 USA or visit http://www.sun.com if you need
+ * additional information or have any questions.
+ */
+
+#ifndef __UIMultiScreenLayout_h__
+#define __UIMultiScreenLayout_h__
+
+/* Global includes */
+#include <QObject>
+
+class UIMachineLogic;
+
+class QMenu;
+class QAction;
+template <class Key, class T> class QMap;
+
+class UIMultiScreenLayout : public QObject
+{
+    Q_OBJECT;
+
+public:
+    UIMultiScreenLayout(UIMachineLogic *pMachineLogic);
+    ~UIMultiScreenLayout();
+
+    void initialize(QMenu *pMenu);
+    void update();
+    int hostScreenCount() const;
+    int guestScreenCount() const;
+    int hostScreenForGuestScreen(int screenId) const;
+
+signals:
+    void screenLayoutChanged();
+
+private slots:
+
+    void sltScreenLayoutChanged(QAction *pAction);
+
+private:
+
+    /* Private member vars */
+    UIMachineLogic *m_pMachineLogic;
+
+    int m_cGuestScreens;
+    int m_cHostScreens;
+
+    QMap<int, int> *m_pScreenMap;
+};
+
+#endif /* __UIMultiScreenLayout_h__ */
+
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 27335)
@@ -680,8 +680,8 @@
 }
 
-QMenu* UISession::newMenu()
+QMenu* UISession::newMenu(UIMainMenuType fOptions /* = UIMainMenuType_ALL */)
 {
     /* Create new menu: */
-    QMenu *pMenu = m_pMenuPool->createMenu(actionsPool());
+    QMenu *pMenu = m_pMenuPool->createMenu(actionsPool(), fOptions);
 
     /* Re-init menu pool for the case menu were recreated: */
@@ -692,8 +692,8 @@
 }
 
-QMenuBar* UISession::newMenuBar()
+QMenuBar* UISession::newMenuBar(UIMainMenuType fOptions /* = UIMainMenuType_ALL */)
 {
     /* Create new menubar: */
-    QMenuBar *pMenuBar = m_pMenuPool->createMenuBar(actionsPool());
+    QMenuBar *pMenuBar = m_pMenuPool->createMenuBar(actionsPool(), fOptions);
 
     /* Re-init menu pool for the case menu were recreated: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h	(revision 27335)
@@ -30,4 +30,5 @@
 /* Local includes */
 #include "COMDefs.h"
+#include "UIMachineDefs.h"
 
 /* Global forwards */
@@ -84,6 +85,6 @@
     UIActionsPool* actionsPool() const;
     QWidget* mainMachineWindow() const;
-    QMenu* newMenu();
-    QMenuBar* newMenuBar();
+    QMenu* newMenu(UIMainMenuType fOptions = UIMainMenuType_All);
+    QMenuBar* newMenuBar(UIMainMenuType fOptions = UIMainMenuType_All);
     QCursor cursor() const { return m_cursor; }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp	(revision 27335)
@@ -30,15 +30,15 @@
 #include "VBoxProblemReporter.h"
 
-#include "UISession.h"
 #include "UIActionsPool.h"
 #include "UIMachineLogicFullscreen.h"
 #include "UIMachineWindow.h"
-
-#include "VBoxUtils.h"
-
-#ifdef Q_WS_MAC
-# ifdef QT_MAC_USE_COCOA
-#  include <Carbon/Carbon.h>
-# endif /* QT_MAC_USE_COCOA */
+#include "UIMachineWindowFullscreen.h"
+#include "UIMultiScreenLayout.h"
+#include "UISession.h"
+
+
+#ifdef Q_WS_MAC
+# include "VBoxUtils.h"
+# include <Carbon/Carbon.h>
 #endif /* Q_WS_MAC */
 
@@ -46,4 +46,5 @@
     : UIMachineLogic(pParent, pSession, pActionsPool, UIVisualStateType_Fullscreen)
 {
+    m_pScreenLayout = new UIMultiScreenLayout(this);
 }
 
@@ -55,4 +56,6 @@
     /* Cleanup action related stuff */
     cleanupActionGroups();
+
+    delete m_pScreenLayout;
 }
 
@@ -67,11 +70,6 @@
     const CConsole &console = uisession()->session().GetConsole();
 
-#if (QT_VERSION >= 0x040600)
-    int cHostScreens = QApplication::desktop()->screenCount();
-#else /* (QT_VERSION >= 0x040600) */
-    int cHostScreens = QApplication::desktop()->numScreens();
-#endif /* !(QT_VERSION >= 0x040600) */
-
-    int cGuestScreens = machine.GetMonitorCount();
+    int cHostScreens = m_pScreenLayout->hostScreenCount();
+    int cGuestScreens = m_pScreenLayout->guestScreenCount();
     /* Check that there are enough physical screens are connected: */
     if (cHostScreens < cGuestScreens)
@@ -167,4 +165,9 @@
 }
 
+int UIMachineLogicFullscreen::hostScreenForGuestScreen(int screenId) const
+{
+    return m_pScreenLayout->hostScreenForGuestScreen(screenId);
+}
+
 #ifdef Q_WS_MAC
 void UIMachineLogicFullscreen::prepareCommonConnections()
@@ -183,4 +186,8 @@
     /* Adjust-window action isn't allowed in fullscreen: */
     actionsPool()->action(UIActionIndex_Simple_AdjustWindow)->setVisible(false);
+
+    /* Add the view menu: */
+    QMenu *pMenu = actionsPool()->action(UIActionIndex_Menu_View)->menu();
+    m_pScreenLayout->initialize(pMenu);
 }
 
@@ -198,17 +205,17 @@
 #endif /* Q_WS_MAC */
 
-#if 0 // TODO: Add seamless multi-monitor support!
-    /* Get monitors count: */
-    ulong uMonitorCount = session().GetMachine().GetMonitorCount();
+    /* Update the multi screen layout */
+    m_pScreenLayout->update();
+
     /* Create machine window(s): */
-    for (ulong uScreenId = 0; uScreenId < uMonitorCount; ++ uScreenId)
-        addMachineWindow(UIMachineWindow::create(this, visualStateType(), uScreenId));
+    for (int screenId = 0; screenId < m_pScreenLayout->guestScreenCount(); ++screenId)
+        addMachineWindow(UIMachineWindow::create(this, visualStateType(), screenId));
     /* Order machine window(s): */
-    for (ulong uScreenId = uMonitorCount; uScreenId > 0; -- uScreenId)
-        machineWindows()[uScreenId - 1]->machineWindow()->raise();
-#else
-    /* Create primary machine window: */
-    addMachineWindow(UIMachineWindow::create(this, visualStateType(), 0 /* primary only */));
-#endif
+    for (int screenId = m_pScreenLayout->guestScreenCount() - 1; screenId >= 0; --screenId)
+        machineWindows().at(screenId)->machineWindow()->raise();
+
+    foreach (UIMachineWindow *pMachineWindow, machineWindows())
+        connect(m_pScreenLayout, SIGNAL(screenLayoutChanged()),
+                static_cast<UIMachineWindowFullscreen*>(pMachineWindow), SLOT(sltPlaceOnScreen()));
 
     /* Remember what machine window(s) created: */
@@ -222,12 +229,7 @@
         return;
 
-#if 0 // TODO: Add seamless multi-monitor support!
     /* Cleanup normal machine window: */
     foreach (UIMachineWindow *pMachineWindow, machineWindows())
         UIMachineWindow::destroy(pMachineWindow);
-#else
-    /* Create machine window(s): */
-    UIMachineWindow::destroy(machineWindows()[0] /* primary only */);
-#endif
 
 #ifdef Q_WS_MAC
@@ -272,2 +274,3 @@
 }
 #endif /* Q_WS_MAC */
+
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h	(revision 27335)
@@ -29,4 +29,5 @@
 /* Local forwards */
 class UIActionsPool;
+class UIMultiScreenLayout;
 class VBoxChangePresentationModeEvent;
 
@@ -45,4 +46,6 @@
     bool checkAvailability();
     void initialize();
+
+    int hostScreenForGuestScreen(int screenId) const;
 
 private slots:
@@ -72,6 +75,9 @@
 #endif /* Q_WS_MAC */
 
+    UIMultiScreenLayout *m_pScreenLayout;
+
     /* Friend classes: */
     friend class UIMachineLogic;
+    friend class UIMachineWindowFullscreen;
 };
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h	(revision 27335)
@@ -81,5 +81,4 @@
     void calculateDesktopGeometry();
     void maybeRestrictMinimumSize();
-    void updateSliders() {}
 
     /* Private members: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp	(revision 27335)
@@ -32,9 +32,10 @@
 #include "VBoxMiniToolBar.h"
 
-#include "UISession.h"
 #include "UIActionsPool.h"
 #include "UIMachineLogic.h"
+#include "UIMachineLogicFullscreen.h"
 #include "UIMachineView.h"
 #include "UIMachineWindowFullscreen.h"
+#include "UISession.h"
 
 UIMachineWindowFullscreen::UIMachineWindowFullscreen(UIMachineLogic *pMachineLogic, ulong uScreenId)
@@ -75,4 +76,8 @@
     updateAppearanceOf(UIVisualElement_AllStuff);
 
+    /* Make sure the window is placed on the right screen before we are going
+     * into fullscreen. */
+    sltPlaceOnScreen();
+
     /* Show window: */
     showFullScreen();
@@ -80,5 +85,6 @@
 #ifdef Q_WS_MAC
     /* Make sure it is really on the right place (especially on the Mac) */
-    move(0, 0);
+    QRect r = QApplication::desktop()->screenGeometry(static_cast<UIMachineLogicFullscreen*>(machineLogic())->hostScreenForGuestScreen(m_uScreenId));
+    move(r.topLeft());
 #endif /* Q_WS_MAC */
 }
@@ -95,4 +101,12 @@
     cleanupMenu();
 }
+
+void UIMachineWindowFullscreen::sltPlaceOnScreen()
+{
+    QRect r = QApplication::desktop()->screenGeometry(static_cast<UIMachineLogicFullscreen*>(machineLogic())->hostScreenForGuestScreen(m_uScreenId));
+    move(r.topLeft());
+    resize(r.size());
+}
+
 
 void UIMachineWindowFullscreen::sltMachineStateChanged()
@@ -155,8 +169,12 @@
 void UIMachineWindowFullscreen::prepareMenu()
 {
-#ifdef Q_WS_MAC
-    setMenuBar(uisession()->newMenuBar());
-#endif /* Q_WS_MAC */
-    m_pMainMenu = uisession()->newMenu();
+    UIMainMenuType fMenus = UIMainMenuType_All;
+    /* Remove the view menu in the case there is one screen only. */
+    if (session().GetMachine().GetMonitorCount() == 1)
+        fMenus = UIMainMenuType(fMenus ^ UIMainMenuType_View);
+#ifdef Q_WS_MAC
+    setMenuBar(uisession()->newMenuBar(fMenus));
+#endif /* Q_WS_MAC */
+    m_pMainMenu = uisession()->newMenu(fMenus);
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h	(revision 27335)
@@ -38,4 +38,8 @@
 {
     Q_OBJECT;
+
+public slots:
+
+    void sltPlaceOnScreen();
 
 protected:
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.h	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.h	(revision 27335)
@@ -46,5 +46,5 @@
 private slots:
 
-    /* Windowed mode funtionality: */
+    /* Windowed mode functionality: */
     void sltPrepareNetworkAdaptersMenu();
     void sltPrepareSharedFoldersMenu();
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp	(revision 27335)
@@ -358,18 +358,2 @@
 }
 
-void UIMachineViewNormal::updateSliders()
-{
-    QSize p = viewport()->size();
-    QSize m = maximumViewportSize();
-
-    QSize v = QSize(frameBuffer()->width(), frameBuffer()->height());
-    /* No scroll bars needed: */
-    if (m.expandedTo(v) == m)
-        p = m;
-
-    horizontalScrollBar()->setRange(0, v.width() - p.width());
-    verticalScrollBar()->setRange(0, v.height() - p.height());
-    horizontalScrollBar()->setPageStep(p.width());
-    verticalScrollBar()->setPageStep(p.height());
-}
-
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h	(revision 27335)
@@ -79,5 +79,4 @@
     void calculateDesktopGeometry();
     void maybeRestrictMinimumSize();
-    void updateSliders();
 
     /* Private members: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp	(revision 27335)
@@ -349,5 +349,6 @@
 void UIMachineWindowNormal::prepareMenu()
 {
-    setMenuBar(uisession()->newMenuBar());
+    /* No view menu in normal mode */
+    setMenuBar(uisession()->newMenuBar(UIMainMenuType(UIMainMenuType_All ^ UIMainMenuType_View)));
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp	(revision 27335)
@@ -30,14 +30,19 @@
 #include "VBoxProblemReporter.h"
 
-#include "UISession.h"
 #include "UIActionsPool.h"
 #include "UIMachineLogicSeamless.h"
 #include "UIMachineWindow.h"
-
-#include "VBoxUtils.h"
+#include "UIMachineWindowSeamless.h"
+#include "UIMultiScreenLayout.h"
+#include "UISession.h"
+
+#ifdef Q_WS_MAC
+# include "VBoxUtils.h"
+#endif /* Q_WS_MAC */
 
 UIMachineLogicSeamless::UIMachineLogicSeamless(QObject *pParent, UISession *pSession, UIActionsPool *pActionsPool)
     : UIMachineLogic(pParent, pSession, pActionsPool, UIVisualStateType_Seamless)
 {
+    m_pScreenLayout = new UIMultiScreenLayout(this);
 }
 
@@ -49,4 +54,6 @@
     /* Cleanup actions groups: */
     cleanupActionGroups();
+
+    delete m_pScreenLayout;
 }
 
@@ -61,11 +68,6 @@
     const CConsole &console = uisession()->session().GetConsole();
 
-#if (QT_VERSION >= 0x040600)
-    int cHostScreens = QApplication::desktop()->screenCount();
-#else /* (QT_VERSION >= 0x040600) */
-    int cHostScreens = QApplication::desktop()->numScreens();
-#endif /* !(QT_VERSION >= 0x040600) */
-
-    int cGuestScreens = machine.GetMonitorCount();
+    int cHostScreens = m_pScreenLayout->hostScreenCount();
+    int cGuestScreens = m_pScreenLayout->guestScreenCount();
     /* Check that there are enough physical screens are connected: */
     if (cHostScreens < cGuestScreens)
@@ -155,4 +157,9 @@
 }
 
+int UIMachineLogicSeamless::hostScreenForGuestScreen(int screenId) const
+{
+    return m_pScreenLayout->hostScreenForGuestScreen(screenId);
+}
+
 void UIMachineLogicSeamless::prepareActionGroups()
 {
@@ -168,4 +175,9 @@
     /* Disable mouse-integration isn't allowed in seamless: */
     actionsPool()->action(UIActionIndex_Toggle_MouseIntegration)->setVisible(false);
+
+    /* Add the view menu: */
+    QMenu *pMenu = actionsPool()->action(UIActionIndex_Menu_View)->menu();
+    m_pScreenLayout->initialize(pMenu);
+    pMenu->setVisible(true);
 }
 
@@ -182,17 +194,17 @@
 #endif /* Q_WS_MAC */
 
-#if 0 // TODO: Add seamless multi-monitor support!
-    /* Get monitors count: */
-    ulong uMonitorCount = session().GetMachine().GetMonitorCount();
+    /* Update the multi screen layout */
+    m_pScreenLayout->update();
+
     /* Create machine window(s): */
-    for (ulong uScreenId = 0; uScreenId < uMonitorCount; ++ uScreenId)
-        addMachineWindow(UIMachineWindow::create(this, visualStateType(), uScreenId));
+    for (int screenId = 0; screenId < m_pScreenLayout->guestScreenCount(); ++screenId)
+        addMachineWindow(UIMachineWindow::create(this, visualStateType(), screenId));
     /* Order machine window(s): */
-    for (ulong uScreenId = uMonitorCount; uScreenId > 0; -- uScreenId)
-        machineWindows()[uScreenId - 1]->machineWindow()->raise();
-#else
-    /* Create primary machine window: */
-    addMachineWindow(UIMachineWindow::create(this, visualStateType(), 0 /* primary only */));
-#endif
+    for (int screenId = m_pScreenLayout->guestScreenCount() - 1; screenId >= 0; --screenId)
+        machineWindows().at(screenId)->machineWindow()->raise();
+
+    foreach (UIMachineWindow *pMachineWindow, machineWindows())
+        connect(m_pScreenLayout, SIGNAL(screenLayoutChanged()),
+                static_cast<UIMachineWindowSeamless*>(pMachineWindow), SLOT(sltPlaceOnScreen()));
 
     /* Remember what machine window(s) created: */
@@ -206,12 +218,7 @@
         return;
 
-#if 0 // TODO: Add seamless multi-monitor support!
     /* Cleanup normal machine window: */
     foreach (UIMachineWindow *pMachineWindow, machineWindows())
         UIMachineWindow::destroy(pMachineWindow);
-#else
-    /* Create machine window(s): */
-    UIMachineWindow::destroy(machineWindows()[0] /* primary only */);
-#endif
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.h	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.h	(revision 27335)
@@ -29,4 +29,5 @@
 /* Local forwards */
 class UIActionsPool;
+class UIMultiScreenLayout;
 
 class UIMachineLogicSeamless : public UIMachineLogic
@@ -45,4 +46,6 @@
     void initialize();
 
+    int hostScreenForGuestScreen(int screenId) const;
+
 private:
 
@@ -55,6 +58,9 @@
     void cleanupActionGroups();
 
+    UIMultiScreenLayout *m_pScreenLayout;
+
     /* Friend classes: */
     friend class UIMachineLogic;
+    friend class UIMachineWindowSeamless;
 };
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp	(revision 27335)
@@ -36,4 +36,5 @@
 #include "UISession.h"
 #include "UIMachineWindow.h"
+#include "UIMachineLogic.h"
 #include "UIFrameBuffer.h"
 #include "UIMachineViewSeamless.h"
@@ -275,4 +276,6 @@
 QRect UIMachineViewSeamless::availableGeometry()
 {
+//    return machineWindowWrapper()->machineLogic()->availableGeometry(screenId());
+
     return QApplication::desktop()->availableGeometry(this);
 }
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h	(revision 27335)
@@ -78,5 +78,4 @@
     void calculateDesktopGeometry();
     void maybeRestrictMinimumSize() {}
-    void updateSliders() {}
     QRegion lastVisibleRegion() const { return m_lastVisibleRegion; }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp	(revision 27335)
@@ -32,12 +32,15 @@
 #include "VBoxMiniToolBar.h"
 
-#ifdef Q_WS_MAC
-# include "VBoxUtils.h"
-#endif /* Q_WS_MAC */
-#include "UISession.h"
 #include "UIActionsPool.h"
 #include "UIMachineLogic.h"
+#include "UIMachineLogicSeamless.h"
 #include "UIMachineView.h"
 #include "UIMachineWindowSeamless.h"
+#include "UIMachineWindowSeamless.h"
+#include "UISession.h"
+
+#ifdef Q_WS_MAC
+# include "VBoxUtils.h"
+#endif /* Q_WS_MAC */
 
 UIMachineWindowSeamless::UIMachineWindowSeamless(UIMachineLogic *pMachineLogic, ulong uScreenId)
@@ -100,4 +103,11 @@
     /* Cleanup menu: */
     cleanupMenu();
+}
+
+void UIMachineWindowSeamless::sltPlaceOnScreen()
+{
+    QRect r = QApplication::desktop()->availableGeometry(static_cast<UIMachineLogicSeamless*>(machineLogic())->hostScreenForGuestScreen(m_uScreenId));
+    move(r.topLeft());
+    resize(r.size());
 }
 
@@ -186,5 +196,5 @@
 {
 #ifdef Q_WS_WIN
-    m_prevRegion = QApplication::desktop()->availableGeometry();
+    m_prevRegion = QApplication::desktop()->availableGeometry(static_cast<UIMachineLogicSeamless*>(machineLogic())->hostScreenForGuestScreen(m_uScreenId));
 #endif
 
@@ -200,8 +210,12 @@
 void UIMachineWindowSeamless::prepareMenu()
 {
-#ifdef Q_WS_MAC
-    setMenuBar(uisession()->newMenuBar());
-#endif /* Q_WS_MAC */
-    m_pMainMenu = uisession()->newMenu();
+    UIMainMenuType fMenus = UIMainMenuType_All;
+    /* Remove the view menu in the case there is one screen only. */
+    if (session().GetMachine().GetMonitorCount() == 1)
+        fMenus = UIMainMenuType(fMenus ^ UIMainMenuType_View);
+#ifdef Q_WS_MAC
+    setMenuBar(uisession()->newMenuBar(fMenus));
+#endif /* Q_WS_MAC */
+    m_pMainMenu = uisession()->newMenu(fMenus);
 }
 
@@ -328,8 +342,12 @@
 {
     /* Show manually maximized window: */
-    QRect geometry = QApplication::desktop()->availableGeometry();
-    move(geometry.topLeft());
-    resize(geometry.size());
+    sltPlaceOnScreen();
     show();
+
+#ifdef Q_WS_MAC
+    /* Make sure it is really on the right place (especially on the Mac) */
+    QRect r = QApplication::desktop()->availableGeometry(static_cast<UIMachineLogicSeamless*>(machineLogic())->hostScreenForGuestScreen(m_uScreenId));
+    move(r.topLeft());
+#endif /* Q_WS_MAC */
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h	(revision 27334)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h	(revision 27335)
@@ -38,4 +38,8 @@
 {
     Q_OBJECT;
+
+public slots:
+
+    void sltPlaceOnScreen();
 
 protected:
