Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 27236)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 27237)
@@ -340,30 +340,4 @@
 {
     m_storedConsoleSize = QSize(iWidth, iHeight);
-}
-
-void UIMachineView::calculateDesktopGeometry()
-{
-    /* This method should not get called until we have initially set up the m_desktopGeometryType: */
-    Assert((m_desktopGeometryType != DesktopGeo_Invalid));
-    /* If we are not doing automatic geometry calculation then there is nothing to do: */
-    if (DesktopGeo_Automatic == m_desktopGeometryType)
-    {
-        /* Available geometry of the desktop.  If the desktop is a single
-         * screen, this will exclude space taken up by desktop taskbars
-         * and things, but this is unfortunately not true for the more
-         * complex case of a desktop spanning multiple screens: */
-        QRect desktop = availableGeometry();
-        /* The area taken up by the machine window on the desktop,
-         * including window frame, title and menu bar and whatnot: */
-        QRect frame = machineWindowWrapper()->machineWindow()->frameGeometry();
-        /* The area taken up by the machine view, so excluding all decorations: */
-        QRect window = geometry();
-        /* To work out how big we can make the console window while still
-         * fitting on the desktop, we calculate desktop - frame + window.
-         * This works because the difference between frame and window
-         * (or at least its width and height) is a constant. */
-        m_desktopGeometry = QSize(desktop.width() - frame.width() + window.width(),
-                                  desktop.height() - frame.height() + window.height());
-    }
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h	(revision 27236)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h	(revision 27237)
@@ -112,5 +112,6 @@
     const QPixmap& pauseShot() const { return m_pauseShot; }
     QSize storedConsoleSize() const { return m_storedConsoleSize; }
-    virtual QSize desktopGeometry() const;
+    DesktopGeo desktopGeometryType() const { return m_desktopGeometryType; }
+    QSize desktopGeometry() const;
 
     /* Protected setters: */
@@ -120,5 +121,4 @@
 
     /* Protected helpers: */
-    void calculateDesktopGeometry();
     void updateMouseCursorShape();
 #ifdef Q_WS_WIN32
@@ -126,4 +126,5 @@
 #endif
     virtual QRect availableGeometry() = 0;
+    virtual void calculateDesktopGeometry() = 0;
     virtual void maybeRestrictMinimumSize() = 0;
     virtual void updateSliders() =  0;
@@ -153,4 +154,7 @@
     bool event(QEvent *pEvent);
     bool eventFilter(QObject *pWatched, QEvent *pEvent);
+
+    /* Protected variables: */
+    QSize m_desktopGeometry;
 
 protected slots:
@@ -222,5 +226,4 @@
 
     DesktopGeo m_desktopGeometryType;
-    QSize m_desktopGeometry;
     QSize m_storedConsoleSize;
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp	(revision 27236)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp	(revision 27237)
@@ -267,4 +267,15 @@
 }
 
+void UIMachineViewFullscreen::calculateDesktopGeometry()
+{
+    /* This method should not get called until we have initially set up the desktop geometry type: */
+    Assert((desktopGeometryType() != DesktopGeo_Invalid));
+    /* If we are not doing automatic geometry calculation then there is nothing to do: */
+    if (desktopGeometryType() == DesktopGeo_Automatic)
+    {
+        m_desktopGeometry = QSize(availableGeometry().width(), availableGeometry().height());
+    }
+}
+
 void UIMachineViewFullscreen::maybeRestrictMinimumSize()
 {
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h	(revision 27236)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h	(revision 27237)
@@ -79,4 +79,5 @@
     void normalizeGeometry(bool /* fAdjustPosition */) {}
     QRect availableGeometry();
+    void calculateDesktopGeometry();
     void maybeRestrictMinimumSize();
     void updateSliders() {}
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp	(revision 27236)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp	(revision 27237)
@@ -322,4 +322,25 @@
 }
 
+void UIMachineViewNormal::calculateDesktopGeometry()
+{
+    /* This method should not get called until we have initially set up the desktop geometry type: */
+    Assert((desktopGeometryType() != DesktopGeo_Invalid));
+    /* If we are not doing automatic geometry calculation then there is nothing to do: */
+    if (desktopGeometryType() == DesktopGeo_Automatic)
+    {
+        /* The area taken up by the machine window on the desktop,
+         * including window frame, title, menu bar and status bar: */
+        QRect windowGeo = machineWindowWrapper()->machineWindow()->frameGeometry();
+        /* The area taken up by the machine central widget, so excluding all decorations: */
+        QRect centralWidgetGeo = static_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow())->centralWidget()->geometry();
+        /* To work out how big we can make the console window while still fitting on the desktop,
+         * we calculate availableGeometry() - (windowGeo - centralWidgetGeo).
+         * This works because the difference between machine window and machine central widget
+         * (or at least its width and height) is a constant. */
+        m_desktopGeometry = QSize(availableGeometry().width() - (windowGeo.width() - centralWidgetGeo.width()),
+                                  availableGeometry().height() - (windowGeo.height() - centralWidgetGeo.height()));
+    }
+}
+
 void UIMachineViewNormal::maybeRestrictMinimumSize()
 {
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h	(revision 27236)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h	(revision 27237)
@@ -77,4 +77,5 @@
     void normalizeGeometry(bool fAdjustPosition);
     QRect availableGeometry();
+    void calculateDesktopGeometry();
     void maybeRestrictMinimumSize();
     void updateSliders();
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp	(revision 27236)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp	(revision 27237)
@@ -274,2 +274,13 @@
 }
 
+void UIMachineViewSeamless::calculateDesktopGeometry()
+{
+    /* This method should not get called until we have initially set up the desktop geometry type: */
+    Assert((desktopGeometryType() != DesktopGeo_Invalid));
+    /* If we are not doing automatic geometry calculation then there is nothing to do: */
+    if (desktopGeometryType() == DesktopGeo_Automatic)
+    {
+        m_desktopGeometry = QSize(availableGeometry().width(), availableGeometry().height());
+    }
+}
+
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h	(revision 27236)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h	(revision 27237)
@@ -76,4 +76,5 @@
     void normalizeGeometry(bool /* fAdjustPosition */) {}
     QRect availableGeometry();
+    void calculateDesktopGeometry();
     void maybeRestrictMinimumSize() {}
     void updateSliders() {}
