Index: /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp	(revision 55938)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp	(revision 55939)
@@ -113,5 +113,4 @@
 const char* UIExtraDataDefs::GUI_AutoresizeGuest = "GUI/AutoresizeGuest";
 const char* UIExtraDataDefs::GUI_LastGuestSizeHint = "GUI/LastGuestSizeHint";
-const char* UIExtraDataDefs::GUI_LastGuestSizeHintWasFullscreen = "GUI/LastGuestSizeHintWasFullscreen";
 const char* UIExtraDataDefs::GUI_VirtualScreenToHostScreen = "GUI/VirtualScreenToHostScreen";
 const char* UIExtraDataDefs::GUI_AutomountGuestScreens = "GUI/AutomountGuestScreens";
Index: /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h	(revision 55938)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h	(revision 55939)
@@ -193,7 +193,4 @@
         extern const char* GUI_LastGuestSizeHint;
         /** Prefix used by composite extra-data keys,
-          * which holds whether guest size-hint was for full or seamless screen per screen-index. */
-        extern const char* GUI_LastGuestSizeHintWasFullscreen;
-        /** Prefix used by composite extra-data keys,
           * which holds host-screen index per guest-screen index. */
         extern const char* GUI_VirtualScreenToHostScreen;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp	(revision 55938)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp	(revision 55939)
@@ -1777,5 +1777,5 @@
            << GUI_Fullscreen_LegacyMode
 #endif /* Q_WS_X11 */
-           << GUI_AutoresizeGuest << GUI_LastGuestSizeHint << GUI_LastGuestSizeHintWasFullscreen
+           << GUI_AutoresizeGuest << GUI_LastGuestSizeHint
            << GUI_VirtualScreenToHostScreen << GUI_AutomountGuestScreens
 #ifdef VBOX_WITH_VIDEOHWACCEL
@@ -3108,22 +3108,4 @@
     /* Re-cache corresponding extra-data: */
     setExtraDataStringList(strKey, data, strID);
-}
-
-bool UIExtraDataManager::wasLastGuestSizeHintForFullScreen(ulong uScreenIndex, const QString &strID)
-{
-    /* Choose corresponding key: */
-    const QString strKey = extraDataKeyPerScreen(GUI_LastGuestSizeHintWasFullscreen, uScreenIndex);
-
-    /* 'True' only if feature is allowed: */
-    return isFeatureAllowed(strKey, strID);
-}
-
-void UIExtraDataManager::markLastGuestSizeHintAsFullScreen(ulong uScreenIndex, bool fWas, const QString &strID)
-{
-    /* Choose corresponding key: */
-    const QString strKey = extraDataKeyPerScreen(GUI_LastGuestSizeHintWasFullscreen, uScreenIndex);
-
-    /* 'True' if feature allowed, null-string otherwise: */
-    return setExtraDataString(strKey, toFeatureAllowed(fWas), strID);
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h	(revision 55938)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h	(revision 55939)
@@ -383,8 +383,4 @@
         /** Defines last guest-screen @a sizeHint for screen with @a uScreenIndex. */
         void setLastGuestSizeHint(ulong uScreenIndex, const QSize &sizeHint, const QString &strID);
-        /** Returns whether guest size-hint was for full or seamless screen with @a uScreenIndex. */
-        bool wasLastGuestSizeHintForFullScreen(ulong uScreenIndex, const QString &strID);
-        /** Defines whether guest size-hint @a fWas for full or seamless screen with @a uScreenIndex. */
-        void markLastGuestSizeHintAsFullScreen(ulong uScreenIndex, bool fWas, const QString &strID);
 
         /** Returns host-screen index corresponding to passed guest-screen @a iGuestScreenIndex. */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 55938)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 55939)
@@ -237,6 +237,8 @@
                                false, 0, 0, size.width(), size.height(), 0);
 
-    /* And track whether we have a "normal" or "fullscreen"/"seamless" size-hint sent: */
-    gEDataManager->markLastGuestSizeHintAsFullScreen(m_uScreenId, isFullscreenOrSeamless(), vboxGlobal().managedVMUuid());
+    /* If we are in normal or scaled mode, remember the size sent for the next
+     * time we have to restore one of those two modes: */
+    if (!isFullscreenOrSeamless())
+        storeGuestSizeHint(size);
 }
 
@@ -826,5 +828,5 @@
 QSize UIMachineView::sizeHint() const
 {
-    if (m_sizeHintOverride.isValid())
+    if (m_sizeHintOverride.isValid() && uisession()->isGuestSupportsGraphics())
         return m_sizeHintOverride;
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp	(revision 55938)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp	(revision 55939)
@@ -55,13 +55,10 @@
     , m_bIsGuestAutoresizeEnabled(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked())
 {
-    /* Resend the last resize hint if necessary: */
-    maybeResendSizeHint();
+    /* Resend the last resize hint: */
+    resendSizeHint();
 }
 
 UIMachineViewNormal::~UIMachineViewNormal()
 {
-    /* Save machine view settings: */
-    saveMachineViewSettings();
-
     /* Cleanup frame buffer: */
     cleanupFrameBuffer();
@@ -127,11 +124,4 @@
 }
 
-void UIMachineViewNormal::saveMachineViewSettings()
-{
-    /* If guest screen-still visible => store it's size-hint: */
-    if (uisession()->isScreenVisible(screenId()))
-        storeGuestSizeHint(QSize(frameBuffer()->width(), frameBuffer()->height()));
-}
-
 void UIMachineViewNormal::setGuestAutoresizeEnabled(bool fEnabled)
 {
@@ -145,23 +135,15 @@
 }
 
-void UIMachineViewNormal::maybeResendSizeHint()
+void UIMachineViewNormal::resendSizeHint()
 {
-    if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())
-    {
-        /* Send guest-screen size-hint if needed to reverse a transition to fullscreen or seamless: */
-        if (gEDataManager->wasLastGuestSizeHintForFullScreen(m_uScreenId, vboxGlobal().managedVMUuid()))
-        {
-            const QSize sizeHint = guestSizeHint();
-            LogRel(("UIMachineViewNormal::maybeResendSizeHint: "
-                    "Restoring guest size-hint for screen %d to %dx%d\n",
-                    (int)screenId(), sizeHint.width(), sizeHint.height()));
-            /* Temporarily restrict the size to prevent a brief resize to the
-             * framebuffer dimensions (see @a UIMachineView::sizeHint()) before
-             * the following resize() is acted upon. */
-            setMaximumSize(sizeHint);
-            m_sizeHintOverride = sizeHint;
-            sltPerformGuestResize(sizeHint);
-        }
-    }
+    const QSize sizeHint = guestSizeHint();
+    LogRel(("GUI: UIMachineViewNormal::resendSizeHint: Restoring guest size-hint for screen %d to %dx%d\n",
+            (int)screenId(), sizeHint.width(), sizeHint.height()));
+    /* Temporarily restrict the size to prevent a brief resize to the
+     * framebuffer dimensions (see @a UIMachineView::sizeHint()) before
+     * the following resize() is acted upon. */
+    setMaximumSize(sizeHint);
+    m_sizeHintOverride = sizeHint;
+    sltPerformGuestResize(sizeHint);
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h	(revision 55938)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h	(revision 55939)
@@ -52,8 +52,6 @@
     void prepareFilters();
     void prepareConsoleConnections();
-    //void loadMachineViewSettings();
 
     /* Cleanup helpers: */
-    void saveMachineViewSettings();
     //void cleanupConsoleConnections() {}
     //void cleanupFilters() {}
@@ -63,6 +61,6 @@
     void setGuestAutoresizeEnabled(bool bEnabled);
 
-    /** Resends guest size-hint if necessary. */
-    void maybeResendSizeHint();
+    /** Resends guest size-hint. */
+    void resendSizeHint();
 
     /** Adjusts guest-screen size to correspond current <i>machine-window</i> size. */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp	(revision 55938)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp	(revision 55939)
@@ -57,13 +57,10 @@
                     )
 {
-    /* Resend the last resize hint if necessary: */
-    maybeResendSizeHint();
+    /* Resend the last resize hint: */
+    resendSizeHint();
 }
 
 UIMachineViewScale::~UIMachineViewScale()
 {
-    /* Save machine view settings: */
-    saveMachineViewSettings();
-
     /* Cleanup frame buffer: */
     cleanupFrameBuffer();
@@ -121,11 +118,4 @@
 }
 
-void UIMachineViewScale::saveMachineViewSettings()
-{
-    /* If guest screen-still visible => store it's size-hint: */
-    if (uisession()->isScreenVisible(screenId()))
-        storeGuestSizeHint(QSize(frameBuffer()->width(), frameBuffer()->height()));
-}
-
 void UIMachineViewScale::applyMachineViewScaleFactor()
 {
@@ -161,18 +151,10 @@
 }
 
-void UIMachineViewScale::maybeResendSizeHint()
-{
-    if (uisession()->isGuestSupportsGraphics())
-    {
-        /* Send guest-screen size-hint if needed to reverse a transition to fullscreen or seamless: */
-        if (gEDataManager->wasLastGuestSizeHintForFullScreen(m_uScreenId, vboxGlobal().managedVMUuid()))
-        {
-            const QSize sizeHint = guestSizeHint();
-            LogRel(("UIMachineViewScale::maybeResendSizeHint: "
-                    "Restoring guest size-hint for screen %d to %dx%d\n",
-                    (int)screenId(), sizeHint.width(), sizeHint.height()));
-            sltPerformGuestResize(sizeHint);
-        }
-    }
+void UIMachineViewScale::resendSizeHint()
+{
+    const QSize sizeHint = guestSizeHint();
+    LogRel(("GUI: UIMachineViewScale::resendSizeHint: Restoring guest size-hint for screen %d to %dx%d\n",
+            (int)screenId(), sizeHint.width(), sizeHint.height()));
+    sltPerformGuestResize(sizeHint);
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.h	(revision 55938)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.h	(revision 55939)
@@ -48,15 +48,9 @@
     bool eventFilter(QObject *pWatched, QEvent *pEvent);
 
-    /* Prepare helpers: */
-    //void loadMachineViewSettings() {}
-
-    /* Cleanup helpers: */
-    void saveMachineViewSettings();
-
     /** Applies machine-view scale-factor. */
     void applyMachineViewScaleFactor();
 
-    /** Resends guest size-hint if necessary. */
-    void maybeResendSizeHint();
+    /** Resends guest size-hint. */
+    void resendSizeHint();
 
     /* Private helpers: */
