Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 49012)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 49013)
@@ -544,9 +544,11 @@
 }
 
-void UIMachineLogic::sltHostScreenResized(int /*iHostScreenNumber*/)
-{
+void UIMachineLogic::sltHostScreenGeometryChanged()
+{
+    LogRelFlow(("UIMachineLogic: Host-screen geometry changed.\n"));
+
     /* Deliver event to all machine-windows: */
     foreach (UIMachineWindow *pMachineWindow, machineWindows())
-        pMachineWindow->handleScreenResize();
+        pMachineWindow->handleScreenGeometryChange();
 }
 
@@ -718,13 +720,9 @@
             this, SLOT(sltGuestMonitorChange(KGuestMonitorChangedEventType, ulong, QRect)));
 
-    /* Host-screen-change updater: */
+    /* Host-screen-change updaters: */
     connect(uisession(), SIGNAL(sigHostScreenCountChanged(int)),
             this, SLOT(sltHostScreenCountChanged(int)));
-
-    /* Host-screen-resize updaters: */
-    connect(uisession(), SIGNAL(sigHostScreenFullGeometryResized(int)),
-            this, SLOT(sltHostScreenResized(int)));
-    connect(uisession(), SIGNAL(sigHostScreenAvailableGeometryResized(int)),
-            this, SLOT(sltHostScreenResized(int)));
+    connect(uisession(), SIGNAL(sigHostScreenGeometryChanged()),
+            this, SLOT(sltHostScreenGeometryChanged()));
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h	(revision 49012)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h	(revision 49013)
@@ -113,5 +113,5 @@
     /* Qt callback handler: */
     virtual void sltHostScreenCountChanged(int cHostScreenCount);
-    virtual void sltHostScreenResized(int iHostScreenNumber);
+    virtual void sltHostScreenGeometryChanged();
 
 protected:
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp	(revision 49012)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp	(revision 49013)
@@ -439,5 +439,5 @@
 }
 
-void UIMachineWindow::handleScreenResize()
+void UIMachineWindow::handleScreenGeometryChange()
 {
     showInNecessaryMode();
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h	(revision 49012)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h	(revision 49013)
@@ -111,5 +111,5 @@
     /* Visibility stuff: */
     void handleScreenCountChange();
-    void handleScreenResize();
+    void handleScreenGeometryChange();
 
     /* Update stuff: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 49012)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 49013)
@@ -22,4 +22,7 @@
 #include <QDesktopWidget>
 #include <QWidget>
+#ifdef Q_WS_MAC
+# include <QTimer>
+#endif /* Q_WS_MAC */
 
 /* GUI includes: */
@@ -41,4 +44,7 @@
 # include "VBoxFBOverlay.h"
 #endif /* VBOX_WITH_VIDEOHWACCEL */
+#ifdef Q_WS_MAC
+# include "VBoxUtils-darwin.h"
+#endif /* Q_WS_MAC */
 
 #ifdef Q_WS_X11
@@ -72,4 +78,31 @@
 #include "CSnapshot.h"
 #include "CMedium.h"
+
+#ifdef Q_WS_MAC
+/**
+ * Application Services: Core Graphics: Display reconfiguration callback.
+ *
+ * Notifies about @a display configuration change.
+ * Corresponding change described by CoreGraphics @a flags.
+ * UISession::sltHandleHostScreenGeometryChange() is called through @a pHandlerObject to handle this callback.
+ *
+ * @note Last argument (@a pHandlerObject) must always be valid pointer to UISession object.
+ */
+void cgDisplayReconfigurationCallback(CGDirectDisplayID display, CGDisplayChangeSummaryFlags flags, void *pHandlerObject)
+{
+    /* Handle 'mode-set' case: */
+    if (flags & kCGDisplaySetModeFlag)
+    {
+        /* Which resolution we received? */
+        size_t iWid = CGDisplayPixelsWide(display);
+        size_t iHig = CGDisplayPixelsHigh(display);
+        LogRelFlow(("UISession::cgDisplayReconfigurationCallback: Display mode changed to: %dx%d.\n", (int)iWid, (int)iHig));
+
+        /* Ask receiver to handle our callback, can't believe I'm using r_c here... */
+        UISession *pReceiver = reinterpret_cast<UISession*>(pHandlerObject);
+        QTimer::singleShot(0, pReceiver, SLOT(sltHandleHostScreenGeometryChange()));
+    }
+}
+#endif /* Q_WS_MAC */
 
 UISession::UISession(UIMachine *pMachine, CSession &sessionReference)
@@ -787,4 +820,12 @@
 }
 
+void UISession::sltHandleHostScreenGeometryChange()
+{
+    LogRelFlow(("UISession: Host-screen geometry changed.\n"));
+
+    /* Notify current machine-logic: */
+    emit sigHostScreenGeometryChanged();
+}
+
 void UISession::sltAdditionsChange()
 {
@@ -878,8 +919,14 @@
             this, SIGNAL(sigHostScreenCountChanged(int)));
 
+    /* Install Qt reconfiguration callbacks: */
     connect(QApplication::desktop(), SIGNAL(resized(int)),
-            this, SIGNAL(sigHostScreenFullGeometryResized(int)));
+            this, SLOT(sltHandleHostScreenGeometryChange()));
     connect(QApplication::desktop(), SIGNAL(workAreaResized(int)),
-            this, SIGNAL(sigHostScreenAvailableGeometryResized(int)));
+            this, SLOT(sltHandleHostScreenGeometryChange()));
+
+#ifdef Q_WS_MAC
+    /* Install display reconfiguration callback: */
+    CGDisplayRegisterReconfigurationCallback(cgDisplayReconfigurationCallback, this);
+#endif /* Q_WS_MAC */
 }
 
@@ -1015,4 +1062,12 @@
     /* Destroy console event-handler: */
     UIConsoleEventHandler::destroy();
+}
+
+void UISession::cleanupConnections()
+{
+#ifdef Q_WS_MAC
+    /* Remove display reconfiguration callback: */
+    CGDisplayRemoveReconfigurationCallback(cgDisplayReconfigurationCallback, this);
+#endif /* Q_WS_MAC */
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h	(revision 49012)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h	(revision 49013)
@@ -158,4 +158,5 @@
     void setSeamlessModeRequested(bool fIsSeamlessModeRequested) { m_fIsSeamlessModeRequested = fIsSeamlessModeRequested; }
     void setAutoCaptureDisabled(bool fIsAutoCaptureDisabled) { m_fIsAutoCaptureDisabled = fIsAutoCaptureDisabled; }
+    void forgetPreviousMachineState() { m_machineStatePrevious = m_machineState; }
 
     /* Keyboard setters: */
@@ -207,8 +208,7 @@
     void sigGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo);
 
-    /* Qt callback signal: */
+    /* Notifiers: Qt callback stuff: */
     void sigHostScreenCountChanged(int cHostScreenCount);
-    void sigHostScreenFullGeometryResized(int iHostScreenNumber);
-    void sigHostScreenAvailableGeometryResized(int iHostScreenNumber);
+    void sigHostScreenGeometryChanged();
 
     /* Session signals: */
@@ -234,4 +234,7 @@
     void sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo);
 
+    /* Handler: Host callback stuff: */
+    void sltHandleHostScreenGeometryChange();
+
 private:
 
@@ -253,5 +256,5 @@
     //void cleanupScreens() {}
     void cleanupConsoleEventHandlers();
-    //void cleanupConnections() {}
+    void cleanupConnections();
 
     /* Update helpers: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp	(revision 49012)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp	(revision 49013)
@@ -97,9 +97,15 @@
     if (uisession()->isRunning() && uisession()->wasPaused())
     {
+        LogRelFlow(("UIMachineLogicFullscreen: "
+                    "Machine-state changed from 'paused' to 'running': "
+                    "Updating screen-layout...\n"));
+
+        /* Make sure further code will be called just once: */
+        uisession()->forgetPreviousMachineState();
         /* We should rebuild screen-layout: */
         m_pScreenLayout->rebuild();
         /* We should update machine-windows sizes: */
         foreach (UIMachineWindow *pMachineWindow, machineWindows())
-            pMachineWindow->handleScreenResize();
+            pMachineWindow->handleScreenGeometryChange();
     }
 }
@@ -119,5 +125,5 @@
 void UIMachineLogicFullscreen::sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo)
 {
-    LogRelFlow(("UIMachineLogicFullscreen::GuestScreenCountChanged.\n"));
+    LogRelFlow(("UIMachineLogicFullscreen: Guest-screen count changed.\n"));
 
     /* Update multi-screen layout before any window update: */
@@ -132,5 +138,5 @@
 void UIMachineLogicFullscreen::sltHostScreenCountChanged(int cScreenCount)
 {
-    LogRelFlow(("UIMachineLogicFullscreen::HostScreenCountChanged.\n"));
+    LogRelFlow(("UIMachineLogicFullscreen: Host-screen count changed.\n"));
 
     /* Update multi-screen layout before any window update: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp	(revision 49012)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp	(revision 49013)
@@ -29,4 +29,5 @@
 #include "UIMachineLogicFullscreen.h"
 #include "UIMachineWindowFullscreen.h"
+#include "UIMachineView.h"
 #include "UIMachineDefs.h"
 #include "UIMiniToolBar.h"
@@ -164,4 +165,6 @@
     /* Resize to the appropriate size: */
     resize(workingArea.size());
+    /* Adjust guest if necessary: */
+    machineView()->normalizeGeometry(false);
     /* Move mini-toolbar into appropriate place: */
     if (m_pMiniToolBar)
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp	(revision 49012)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp	(revision 49013)
@@ -109,9 +109,15 @@
     if (uisession()->isRunning() && uisession()->wasPaused())
     {
+        LogRelFlow(("UIMachineLogicSeamless: "
+                    "Machine-state changed from 'paused' to 'running': "
+                    "Updating screen-layout...\n"));
+
+        /* Make sure further code will be called just once: */
+        uisession()->forgetPreviousMachineState();
         /* We should rebuild screen-layout: */
         m_pScreenLayout->rebuild();
         /* We should update machine-windows sizes: */
         foreach (UIMachineWindow *pMachineWindow, machineWindows())
-            pMachineWindow->handleScreenResize();
+            pMachineWindow->handleScreenGeometryChange();
     }
 }
@@ -119,5 +125,5 @@
 void UIMachineLogicSeamless::sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo)
 {
-    LogRelFlow(("UIMachineLogicSeamless::GuestScreenCountChanged.\n"));
+    LogRelFlow(("UIMachineLogicSeamless: Guest-screen count changed.\n"));
 
     /* Update multi-screen layout before any window update: */
@@ -132,5 +138,5 @@
 void UIMachineLogicSeamless::sltHostScreenCountChanged(int cScreenCount)
 {
-    LogRelFlow(("UIMachineLogicSeamless::HostScreenCountChanged.\n"));
+    LogRelFlow(("UIMachineLogicSeamless: Host-screen count changed.\n"));
 
     /* Update multi-screen layout before any window update: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp	(revision 49012)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp	(revision 49013)
@@ -29,5 +29,5 @@
 #include "UIMachineLogicSeamless.h"
 #include "UIMachineWindowSeamless.h"
-#include "UIMachineViewSeamless.h"
+#include "UIMachineView.h"
 #ifndef Q_WS_MAC
 # include "UIMachineDefs.h"
@@ -197,4 +197,6 @@
     /* Resize to the appropriate size: */
     resize(workingArea.size());
+    /* Adjust guest if necessary: */
+    machineView()->normalizeGeometry(false);
 #ifndef Q_WS_MAC
     /* Move mini-toolbar into appropriate place: */
