Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 38946)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 38947)
@@ -20,4 +20,5 @@
 /* Global includes */
 #include <QDesktopWidget>
+#include <QMainWindow>
 #include <QTimer>
 #include <QPainter>
@@ -145,4 +146,37 @@
 }
 
+void UIMachineView::sltPerformGuestResize(const QSize &toSize)
+{
+    /* Get machine window: */
+    QMainWindow *pMachineWindow = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
+                                  qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow()) : 0;
+
+    /* If this slot is invoked directly then use the passed size otherwise get
+     * the available size for the guest display. We assume here that centralWidget()
+     * contains this view only and gives it all available space: */
+    QSize newSize(toSize.isValid() ? toSize : pMachineWindow ? pMachineWindow->centralWidget()->size() : QSize());
+    AssertMsg(newSize.isValid(), ("Size should be valid!\n"));
+
+    /* Do not send the same hints as we already have: */
+    if ((newSize.width() == storedConsoleSize().width()) && (newSize.height() == storedConsoleSize().height()))
+        return;
+
+    /* We only actually send the hint if either an explicit new size was given
+     * (e.g. if the request was triggered directly by a console resize event) or
+     * if no explicit size was specified but a resize is flagged as being needed
+     * (e.g. the autoresize was just enabled and the console was resized while it was disabled). */
+    if (toSize.isValid() || m_fShouldWeDoResize)
+    {
+        /* Remember the new size: */
+        storeConsoleSize(newSize.width(), newSize.height());
+
+        /* Send new size-hint to the guest: */
+        session().GetConsole().GetDisplay().SetVideoModeHint(newSize.width(), newSize.height(), 0, screenId());
+    }
+
+    /* We had requested resize now, rejecting other accident requests: */
+    m_fShouldWeDoResize = false;
+}
+
 void UIMachineView::sltMachineStateChanged()
 {
@@ -215,4 +249,5 @@
     , m_desktopGeometryType(DesktopGeo_Invalid)
     , m_bIsMachineWindowResizeIgnored(false)
+    , m_fShouldWeDoResize(false)
 #ifdef VBOX_WITH_VIDEOHWACCEL
     , m_fAccelerate2DVideo(bAccelerate2DVideo)
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h	(revision 38946)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h	(revision 38947)
@@ -73,4 +73,7 @@
 
 protected slots:
+
+    /* Slot to perform guest resize: */
+    void sltPerformGuestResize(const QSize &aSize = QSize());
 
     /* Console callback handlers: */
@@ -166,5 +169,5 @@
 #endif
 
-    /* Private members: */
+    /* Protected members: */
     UIMachineWindow *m_pMachineWindow;
     ulong m_uScreenId;
@@ -177,4 +180,5 @@
 
     bool m_bIsMachineWindowResizeIgnored : 1;
+    bool m_fShouldWeDoResize : 1;
 #ifdef VBOX_WITH_VIDEOHWACCEL
     bool m_fAccelerate2DVideo : 1;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp	(revision 38946)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp	(revision 38947)
@@ -52,5 +52,4 @@
                     )
     , m_bIsGuestAutoresizeEnabled(gActionPool->action(UIActionIndexRuntime_Toggle_GuestAutoresize)->isChecked())
-    , m_fShouldWeDoResize(false)
     , m_pSyncBlocker(0)
 {
@@ -89,40 +88,4 @@
 }
 
-void UIMachineViewFullscreen::sltPerformGuestResize(const QSize &toSize)
-{
-    if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())
-    {
-        /* Get machine window: */
-        QMainWindow *pMachineWindow = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
-                                      qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow()) : 0;
-
-        /* If this slot is invoked directly then use the passed size otherwise get
-         * the available size for the guest display. We assume here that centralWidget()
-         * contains this view only and gives it all available space: */
-        QSize newSize(toSize.isValid() ? toSize : pMachineWindow ? pMachineWindow->centralWidget()->size() : QSize());
-        AssertMsg(newSize.isValid(), ("Size should be valid!\n"));
-
-        /* Do not send the same hints as we already have: */
-        if ((newSize.width() == storedConsoleSize().width()) && (newSize.height() == storedConsoleSize().height()))
-            return;
-
-        /* We only actually send the hint if either an explicit new size was given
-         * (e.g. if the request was triggered directly by a console resize event) or
-         * if no explicit size was specified but a resize is flagged as being needed
-         * (e.g. the autoresize was just enabled and the console was resized while it was disabled). */
-        if (toSize.isValid() || m_fShouldWeDoResize)
-        {
-            /* Remember the new size: */
-            storeConsoleSize(newSize.width(), newSize.height());
-
-            /* Send new size-hint to the guest: */
-            session().GetConsole().GetDisplay().SetVideoModeHint(newSize.width(), newSize.height(), 0, screenId());
-        }
-
-        /* We had requested resize now, rejecting other accident requests: */
-        m_fShouldWeDoResize = false;
-    }
-}
-
 void UIMachineViewFullscreen::sltAdditionsStateChanged()
 {
@@ -130,9 +93,9 @@
     maybeRestrictMinimumSize();
 
-    /* Check if we should resize guest to fullscreen, all the
-     * required features will be tested in sltPerformGuestResize(...): */
+    /* Check if we should resize guest to fullscreen */
     if ((int)frameBuffer()->width() != workingArea().size().width() ||
         (int)frameBuffer()->height() != workingArea().size().height())
-        sltPerformGuestResize(workingArea().size());
+        if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())
+            sltPerformGuestResize(workingArea().size());
 }
 
@@ -321,5 +284,6 @@
         maybeRestrictMinimumSize();
 
-        sltPerformGuestResize();
+        if (uisession()->isGuestSupportsGraphics())
+            sltPerformGuestResize();
     }
 }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h	(revision 38946)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h	(revision 38947)
@@ -41,7 +41,4 @@
 private slots:
 
-    /* Slot to perform guest resize: */
-    void sltPerformGuestResize(const QSize &aSize = QSize());
-
     /* Console callback handlers: */
     void sltAdditionsStateChanged();
@@ -81,5 +78,4 @@
     /* Private variables: */
     bool m_bIsGuestAutoresizeEnabled : 1;
-    bool m_fShouldWeDoResize : 1;
     UIMachineViewBlocker *m_pSyncBlocker;
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp	(revision 38946)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp	(revision 38947)
@@ -48,5 +48,4 @@
                     )
     , m_bIsGuestAutoresizeEnabled(gActionPool->action(UIActionIndexRuntime_Toggle_GuestAutoresize)->isChecked())
-    , m_fShouldWeDoResize(false)
 {
     /* Load machine view settings: */
@@ -83,40 +82,4 @@
     /* Cleanup frame buffer: */
     cleanupFrameBuffer();
-}
-
-void UIMachineViewNormal::sltPerformGuestResize(const QSize &toSize)
-{
-    if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())
-    {
-        /* Get machine window: */
-        QMainWindow *pMachineWindow = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
-                                      qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow()) : 0;
-
-        /* If this slot is invoked directly then use the passed size otherwise get
-         * the available size for the guest display. We assume here that centralWidget()
-         * contains this view only and gives it all available space: */
-        QSize newSize(toSize.isValid() ? toSize : pMachineWindow ? pMachineWindow->centralWidget()->size() : QSize());
-        AssertMsg(newSize.isValid(), ("Size should be valid!\n"));
-
-        /* Do not send the same hints as we already have: */
-        if ((newSize.width() == storedConsoleSize().width()) && (newSize.height() == storedConsoleSize().height()))
-            return;
-
-        /* We only actually send the hint if either an explicit new size was given
-         * (e.g. if the request was triggered directly by a console resize event) or
-         * if no explicit size was specified but a resize is flagged as being needed
-         * (e.g. the autoresize was just enabled and the console was resized while it was disabled). */
-        if (toSize.isValid() || m_fShouldWeDoResize)
-        {
-            /* Remember the new size: */
-            storeConsoleSize(newSize.width(), newSize.height());
-
-            /* Send new size-hint to the guest: */
-            session().GetConsole().GetDisplay().SetVideoModeHint(newSize.width(), newSize.height(), 0, screenId());
-        }
-
-        /* We had requested resize now, rejecting other accident requests: */
-        m_fShouldWeDoResize = false;
-    }
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h	(revision 38946)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h	(revision 38947)
@@ -40,7 +40,4 @@
 
 private slots:
-
-    /* Slot to perform guest resize: */
-    void sltPerformGuestResize(const QSize &size = QSize());
 
     /* Console callback handlers: */
@@ -87,5 +84,4 @@
     /* Private members: */
     bool m_bIsGuestAutoresizeEnabled : 1;
-    bool m_fShouldWeDoResize : 1;
 
     /* Friend classes: */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp	(revision 38946)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp	(revision 38947)
@@ -50,5 +50,4 @@
 #endif
                     )
-    , m_fShouldWeDoResize(false)
     , m_pSyncBlocker(0)
 {
@@ -89,40 +88,4 @@
     /* Cleanup frame buffer: */
     cleanupFrameBuffer();
-}
-
-void UIMachineViewSeamless::sltPerformGuestResize(const QSize &toSize)
-{
-    if (uisession()->isGuestSupportsGraphics())
-    {
-        /* Get machine window: */
-        QMainWindow *pMachineWindow = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?
-                                      qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow()) : 0;
-
-        /* If this slot is invoked directly then use the passed size otherwise get
-         * the available size for the guest display. We assume here that centralWidget()
-         * contains this view only and gives it all available space: */
-        QSize newSize(toSize.isValid() ? toSize : pMachineWindow ? pMachineWindow->centralWidget()->size() : QSize());
-        AssertMsg(newSize.isValid(), ("Size should be valid!\n"));
-
-        /* Do not send the same hints as we already have: */
-        if ((newSize.width() == storedConsoleSize().width()) && (newSize.height() == storedConsoleSize().height()))
-            return;
-
-        /* We only actually send the hint if either an explicit new size was given
-         * (e.g. if the request was triggered directly by a console resize event) or
-         * if no explicit size was specified but a resize is flagged as being needed
-         * (e.g. the autoresize was just enabled and the console was resized while it was disabled). */
-        if (toSize.isValid() || m_fShouldWeDoResize)
-        {
-            /* Remember the new size: */
-            storeConsoleSize(newSize.width(), newSize.height());
-
-            /* Send new size-hint to the guest: */
-            session().GetConsole().GetDisplay().SetVideoModeHint(newSize.width(), newSize.height(), 0, screenId());
-        }
-
-        /* We had requested resize now, rejecting other accident requests: */
-        m_fShouldWeDoResize = false;
-    }
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h	(revision 38946)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h	(revision 38947)
@@ -46,7 +46,4 @@
 private slots:
 
-    /* Slot to perform guest resize: */
-    void sltPerformGuestResize(const QSize &aSize = QSize());
-
     /* Console callback handlers: */
     void sltAdditionsStateChanged();
@@ -82,5 +79,4 @@
 
     /* Private variables: */
-    bool m_fShouldWeDoResize : 1;
     QRegion m_lastVisibleRegion;
     UIMachineViewBlocker *m_pSyncBlocker;
