Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 50630)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 50631)
@@ -597,23 +597,27 @@
 void UIMachineLogic::sltGuestMonitorChange(KGuestMonitorChangedEventType, ulong, QRect)
 {
-    /* Deliver event to all machine-windows: */
+    LogRel(("UIMachineLogic: Guest-screen count changed.\n"));
+
+    /* Make sure all machine-window(s) have proper geometry: */
     foreach (UIMachineWindow *pMachineWindow, machineWindows())
-        pMachineWindow->handleScreenCountChange();
+        pMachineWindow->showInNecessaryMode();
 }
 
 void UIMachineLogic::sltHostScreenCountChanged()
 {
-    /* Deliver event to all machine-windows: */
+    LogRel(("UIMachineLogic: Host-screen count changed.\n"));
+
+    /* Make sure all machine-window(s) have proper geometry: */
     foreach (UIMachineWindow *pMachineWindow, machineWindows())
-        pMachineWindow->handleScreenCountChange();
+        pMachineWindow->showInNecessaryMode();
 }
 
 void UIMachineLogic::sltHostScreenGeometryChanged()
 {
-    LogRelFlow(("UIMachineLogic: Host-screen geometry changed.\n"));
-
-    /* Deliver event to all machine-windows: */
+    LogRel(("UIMachineLogic: Host-screen geometry changed.\n"));
+
+    /* Make sure all machine-window(s) have proper geometry: */
     foreach (UIMachineWindow *pMachineWindow, machineWindows())
-        pMachineWindow->handleScreenGeometryChange();
+        pMachineWindow->showInNecessaryMode();
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp	(revision 50630)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp	(revision 50631)
@@ -442,24 +442,4 @@
 }
 
-void UIMachineWindow::handleScreenCountChange()
-{
-    /* Ignore if window is minimized: */
-    if (isMinimized())
-        return;
-
-    /* Make sure window is in necessary mode: */
-    showInNecessaryMode();
-}
-
-void UIMachineWindow::handleScreenGeometryChange()
-{
-    /* Ignore if window is minimized: */
-    if (isMinimized())
-        return;
-
-    /* Make sure window is in necessary mode: */
-    showInNecessaryMode();
-}
-
 void UIMachineWindow::updateAppearanceOf(int iElement)
 {
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h	(revision 50630)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h	(revision 50631)
@@ -121,8 +121,4 @@
     virtual void cleanupSessionConnections() {}
 
-    /* Visibility stuff: */
-    void handleScreenCountChange();
-    void handleScreenGeometryChange();
-
     /* Update stuff: */
     virtual void updateAppearanceOf(int iElement);
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp	(revision 50630)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp	(revision 50631)
@@ -85,7 +85,7 @@
     /* We should rebuild screen-layout: */
     m_pScreenLayout->rebuild();
-    /* And update machine-windows sizes finally: */
+    /* Make sure all machine-window(s) have proper geometry: */
     foreach (UIMachineWindow *pMachineWindow, machineWindows())
-        pMachineWindow->handleScreenGeometryChange();
+        pMachineWindow->showInNecessaryMode();
 }
 
@@ -150,7 +150,8 @@
             /* Reactivate 'presentation mode': */
             setPresentationModeEnabled(true);
-            /* Re-enter fullscreen mode: */
+            /* Make sure all machine-window(s) have proper geometry: */
             foreach (UIMachineWindow *pMachineWindow, machineWindows())
                 pMachineWindow->showInNecessaryMode();
+            /* Re-enter fullscreen mode: */
             foreach (UIMachineWindow *pMachineWindow, machineWindows())
                 if (   uisession()->isScreenVisible(pMachineWindow->screenId())
@@ -243,7 +244,7 @@
         /* We should rebuild screen-layout: */
         m_pScreenLayout->rebuild();
-        /* We should update machine-windows sizes: */
-        foreach (UIMachineWindow *pMachineWindow, machineWindows())
-            pMachineWindow->handleScreenGeometryChange();
+        /* Make sure all machine-window(s) have proper geometry: */
+        foreach (UIMachineWindow *pMachineWindow, machineWindows())
+            pMachineWindow->showInNecessaryMode();
     }
 }
@@ -262,5 +263,5 @@
     if (vboxGlobal().osRelease() <= MacOSXRelease_Lion)
     {
-        /* Update machine-window(s) location/size: */
+        /* Make sure all machine-window(s) have proper geometry: */
         foreach (UIMachineWindow *pMachineWindow, machineWindows())
             pMachineWindow->showInNecessaryMode();
@@ -271,5 +272,5 @@
     else invalidateFullscreenMode();
 #else /* !Q_WS_MAC */
-    /* Update machine-window(s) location/size: */
+    /* Make sure all machine-window(s) have proper geometry: */
     foreach (UIMachineWindow *pMachineWindow, machineWindows())
         pMachineWindow->showInNecessaryMode();
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp	(revision 50630)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp	(revision 50631)
@@ -246,47 +246,48 @@
 void UIMachineWindowFullscreen::showInNecessaryMode()
 {
-    /* Should we show window?: */
-    if (uisession()->isScreenVisible(m_uScreenId))
-    {
-        /* Do we have the seamless logic? */
-        if (UIMachineLogicFullscreen *pFullscreenLogic = qobject_cast<UIMachineLogicFullscreen*>(machineLogic()))
-        {
-            /* Is this guest screen has own host screen? */
-            if (pFullscreenLogic->hasHostScreenForGuestScreen(m_uScreenId))
-            {
-                /* Make sure the window is maximized and placed on valid screen: */
-                placeOnScreen();
+    /* Make sure this window should be shown at all: */
+    if (!uisession()->isScreenVisible(m_uScreenId))
+        return hide();
+
+    /* Make sure this window has fullscreen logic: */
+    UIMachineLogicFullscreen *pFullscreenLogic = qobject_cast<UIMachineLogicFullscreen*>(machineLogic());
+    if (!pFullscreenLogic)
+        return hide();
+
+    /* Make sure this window mapped to some host-screen: */
+    if (!pFullscreenLogic->hasHostScreenForGuestScreen(m_uScreenId))
+        return hide();
+
+    /* Make sure this window is not minimized: */
+    if (isMinimized())
+        return;
+
+    /* Make sure this window is maximized and placed on valid screen: */
+    placeOnScreen();
 
 #ifdef Q_WS_WIN
-                /* On Windows we should activate main window first,
-                 * because entering fullscreen there doesn't means window will be auto-activated,
-                 * so no window-activation event will be received
-                 * and no keyboard-hook created otherwise... */
-                if (m_uScreenId == 0)
-                    setWindowState(windowState() | Qt::WindowActive);
+    /* On Windows we should activate main window first,
+     * because entering fullscreen there doesn't means window will be auto-activated,
+     * so no window-activation event will be received and no keyboard-hook created otherwise... */
+    if (m_uScreenId == 0)
+        setWindowState(windowState() | Qt::WindowActive);
 #endif /* Q_WS_WIN */
 
 #ifdef Q_WS_MAC
-                /* ML and next using native stuff, so we can call for simple show(): */
-                if (vboxGlobal().osRelease() > MacOSXRelease_Lion) show();
-                /* Lion and previous still using Qt one, call for showFullScreen(): */
-                else showFullScreen();
+    /* ML and next using native stuff, so we can call for simple show(): */
+    if (vboxGlobal().osRelease() > MacOSXRelease_Lion) show();
+    /* Lion and previous using Qt stuff, so we should call for showFullScreen(): */
+    else showFullScreen();
 #else /* !Q_WS_MAC */
-                /* Show in fullscreen mode: */
-                showFullScreen();
+    /* Show in fullscreen mode: */
+    showFullScreen();
 #endif /* !Q_WS_MAC */
 
-                /* Make sure the window is placed on valid screen again
-                 * after window is shown & window's decorations applied.
-                 * That is required (still?) due to X11 Window Geometry Rules. */
-                placeOnScreen();
-
-                /* Return early: */
-                return;
-            }
-        }
-    }
-    /* Hide in other cases: */
-    hide();
+#ifdef Q_WS_X11
+    /* Make sure the window is placed on valid screen again
+     * after window is shown & window's decorations applied.
+     * That is required (still?) due to X11 Window Geometry Rules. */
+    placeOnScreen();
+#endif /* Q_WS_X11 */
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp	(revision 50630)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp	(revision 50631)
@@ -609,10 +609,14 @@
 void UIMachineWindowNormal::showInNecessaryMode()
 {
-    /* Show window if we have to: */
-    if (uisession()->isScreenVisible(m_uScreenId))
-        show();
-    /* Else hide window: */
-    else
-        hide();
+    /* Make sure this window should be shown at all: */
+    if (!uisession()->isScreenVisible(m_uScreenId))
+        return hide();
+
+    /* Make sure this window is not minimized: */
+    if (isMinimized())
+        return;
+
+    /* Show in normal mode: */
+    show();
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp	(revision 50630)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp	(revision 50631)
@@ -197,10 +197,14 @@
 void UIMachineWindowScale::showInNecessaryMode()
 {
-    /* Show window if we have to: */
-    if (uisession()->isScreenVisible(m_uScreenId))
-        show();
-    /* Else hide window: */
-    else
-        hide();
+    /* Make sure this window should be shown at all: */
+    if (!uisession()->isScreenVisible(m_uScreenId))
+        return hide();
+
+    /* Make sure this window is not minimized: */
+    if (isMinimized())
+        return;
+
+    /* Show in normal mode: */
+    show();
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp	(revision 50630)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp	(revision 50631)
@@ -82,7 +82,7 @@
     /* We should rebuild screen-layout: */
     m_pScreenLayout->rebuild();
-    /* We should update machine-windows sizes: */
+    /* Make sure all machine-window(s) have proper geometry: */
     foreach (UIMachineWindow *pMachineWindow, machineWindows())
-        pMachineWindow->handleScreenGeometryChange();
+        pMachineWindow->showInNecessaryMode();
 }
 
@@ -140,7 +140,7 @@
         /* We should rebuild screen-layout: */
         m_pScreenLayout->rebuild();
-        /* We should update machine-windows sizes: */
+        /* Make sure all machine-window(s) have proper geometry: */
         foreach (UIMachineWindow *pMachineWindow, machineWindows())
-            pMachineWindow->handleScreenGeometryChange();
+            pMachineWindow->showInNecessaryMode();
     }
 }
@@ -148,5 +148,5 @@
 void UIMachineLogicSeamless::sltScreenLayoutChanged()
 {
-    /* Update machine-window(s) location/size: */
+    /* Make sure all machine-window(s) have proper geometry: */
     foreach (UIMachineWindow *pMachineWindow, machineWindows())
         pMachineWindow->showInNecessaryMode();
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp	(revision 50630)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp	(revision 50631)
@@ -214,26 +214,26 @@
 void UIMachineWindowSeamless::showInNecessaryMode()
 {
-    /* Should we show window?: */
-    if (uisession()->isScreenVisible(m_uScreenId))
-    {
-        /* Do we have the seamless logic? */
-        if (UIMachineLogicSeamless *pSeamlessLogic = qobject_cast<UIMachineLogicSeamless*>(machineLogic()))
-        {
-            /* Is this guest screen has own host screen? */
-            if (pSeamlessLogic->hasHostScreenForGuestScreen(m_uScreenId))
-            {
-                /* Make sure the window is maximized and placed on valid screen: */
-                placeOnScreen();
-
-                /* Show in normal mode: */
-                show();
-
-                /* Return early: */
-                return;
-            }
-        }
-    }
-    /* Hide in other cases: */
-    hide();
+    /* Make sure this window should be shown at all: */
+    if (!uisession()->isScreenVisible(m_uScreenId))
+        return hide();
+
+    /* Make sure this window has seamless logic: */
+    UIMachineLogicSeamless *pSeamlessLogic = qobject_cast<UIMachineLogicSeamless*>(machineLogic());
+    if (!pSeamlessLogic)
+        return hide();
+
+    /* Make sure this window mapped to some host-screen: */
+    if (!pSeamlessLogic->hasHostScreenForGuestScreen(m_uScreenId))
+        return hide();
+
+    /* Make sure this window is not minimized: */
+    if (isMinimized())
+        return;
+
+    /* Make sure this window is maximized and placed on valid screen: */
+    placeOnScreen();
+
+    /* Show in normal mode: */
+    show();
 }
 
