Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 30258)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp	(revision 30259)
@@ -793,76 +793,4 @@
             }
             break;
-        }
-
-        case VBoxDefs::ResizeEventType:
-        {
-            /* Some situations require framebuffer resize events to be ignored,
-             * leaving machine window & machine view & framebuffer sizes preserved: */
-            if (uisession()->isGuestResizeIgnored())
-                return true;
-
-            /* We are starting to perform machine view resize: */
-            bool oldIgnoreMainwndResize = isMachineWindowResizeIgnored();
-            setMachineWindowResizeIgnored(true);
-
-            /* Get guest resize-event: */
-            UIResizeEvent *pResizeEvent = static_cast<UIResizeEvent*>(pEvent);
-
-            /* Perform framebuffer resize: */
-            frameBuffer()->resizeEvent(pResizeEvent);
-
-            /* Reapply maximum size restriction for machine view: */
-            setMaximumSize(sizeHint());
-
-            /* Store the new size to prevent unwanted resize hints being sent back: */
-            storeConsoleSize(pResizeEvent->width(), pResizeEvent->height());
-
-            /* Perform machine-view resize: */
-            resize(pResizeEvent->width(), pResizeEvent->height());
-
-            /* Let our toplevel widget calculate its sizeHint properly. */
-#ifdef Q_WS_X11
-            /* We use processEvents rather than sendPostedEvents & set the time out value to max cause on X11 otherwise
-             * the layout isn't calculated correctly. Dosn't find the bug in Qt, but this could be triggered through
-             * the async nature of the X11 window event system. */
-            QCoreApplication::processEvents(QEventLoop::AllEvents, INT_MAX);
-#else /* Q_WS_X11 */
-            QCoreApplication::sendPostedEvents(0, QEvent::LayoutRequest);
-#endif /* Q_WS_X11 */
-
-#ifdef Q_WS_MAC
-            machineLogic()->updateDockIconSize(screenId(), pResizeEvent->width(), pResizeEvent->height());
-#endif /* Q_WS_MAC */
-
-            /* Update mouse cursor shape: */
-            updateMouseCursorShape();
-
-            /* May be we have to restrict minimum size? */
-            maybeRestrictMinimumSize();
-
-            /* Update machine-view sliders: */
-            updateSliders();
-
-            /* Normalize geometry: */
-            normalizeGeometry(true /* adjustPosition */);
-
-            /* Report to the VM thread that we finished resizing */
-            session().GetConsole().GetDisplay().ResizeCompleted(screenId());
-
-            /* We are finishing to perform machine-view resize: */
-            setMachineWindowResizeIgnored(oldIgnoreMainwndResize);
-
-            /* Make sure that all posted signals are processed: */
-            qApp->processEvents();
-
-            /* We also recalculate the desktop geometry if this is determined
-             * automatically.  In fact, we only need this on the first resize,
-             * but it is done every time to keep the code simpler. */
-            calculateDesktopGeometry();
-
-            /* Emit a signal about guest was resized: */
-            emit resizeHintDone();
-
-            return true;
         }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp	(revision 30258)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp	(revision 30259)
@@ -149,4 +149,77 @@
     switch (pEvent->type())
     {
+        case VBoxDefs::ResizeEventType:
+        {
+            /* Some situations requires framebuffer resize events to be ignored at all,
+             * leaving machine-window, machine-view and framebuffer sizes preserved: */
+            if (uisession()->isGuestResizeIgnored())
+                return true;
+
+            /* We are starting to perform machine-view resize: */
+            bool oldIgnoreMainwndResize = isMachineWindowResizeIgnored();
+            setMachineWindowResizeIgnored(true);
+
+            /* Get guest resize-event: */
+            UIResizeEvent *pResizeEvent = static_cast<UIResizeEvent*>(pEvent);
+
+            /* Perform framebuffer resize: */
+            frameBuffer()->resizeEvent(pResizeEvent);
+
+            /* Reapply maximum size restriction for machine-view: */
+            setMaximumSize(sizeHint());
+
+            /* Store the new size to prevent unwanted resize hints being sent back: */
+            storeConsoleSize(pResizeEvent->width(), pResizeEvent->height());
+
+            /* Perform machine-view resize: */
+            resize(pResizeEvent->width(), pResizeEvent->height());
+
+            /* Let our toplevel widget calculate its sizeHint properly. */
+#ifdef Q_WS_X11
+            /* We use processEvents rather than sendPostedEvents & set the time out value to max cause on X11 otherwise
+             * the layout isn't calculated correctly. Dosn't find the bug in Qt, but this could be triggered through
+             * the async nature of the X11 window event system. */
+            QCoreApplication::processEvents(QEventLoop::AllEvents, INT_MAX);
+#else /* Q_WS_X11 */
+            QCoreApplication::sendPostedEvents(0, QEvent::LayoutRequest);
+#endif /* Q_WS_X11 */
+
+#ifdef Q_WS_MAC
+            machineLogic()->updateDockIconSize(screenId(), pResizeEvent->width(), pResizeEvent->height());
+#endif /* Q_WS_MAC */
+
+            /* Update mouse cursor shape: */
+            updateMouseCursorShape();
+
+            /* May be we have to restrict minimum size? */
+            maybeRestrictMinimumSize();
+
+            /* Update machine-view sliders: */
+            updateSliders();
+
+            /* Report to the VM thread that we finished resizing */
+            session().GetConsole().GetDisplay().ResizeCompleted(screenId());
+
+            /* We are finishing to perform machine-view resize: */
+            setMachineWindowResizeIgnored(oldIgnoreMainwndResize);
+
+            /* Make sure that all posted signals are processed: */
+            qApp->processEvents();
+
+            /* We also recalculate the desktop geometry if this is determined
+             * automatically.  In fact, we only need this on the first resize,
+             * but it is done every time to keep the code simpler. */
+            calculateDesktopGeometry();
+
+            /* Emit a signal about guest was resized: */
+            emit resizeHintDone();
+
+            /* Unlock after processing guest resize event: */
+            if (m_pSyncBlocker && m_pSyncBlocker->isRunning())
+                m_pSyncBlocker->quit();
+
+            return true;
+        }
+
         case QEvent::KeyPress:
         case QEvent::KeyRelease:
@@ -163,13 +236,6 @@
                     pEvent->ignore();
             }
-        }
-
-        case VBoxDefs::ResizeEventType:
-        {
-            /* Unlock after processing guest resize event: */
-            bool fResult = UIMachineView::event(pEvent);
-            if (m_pSyncBlocker && m_pSyncBlocker->isRunning())
-                m_pSyncBlocker->quit();
-            return fResult;
+
+            break;
         }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp	(revision 30258)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp	(revision 30259)
@@ -137,9 +137,81 @@
 bool UIMachineViewNormal::event(QEvent *pEvent)
 {
-    /* We don't want this on the Mac, cause there the menu bar isn't within the
-     * window and popping up a menu there looks really ugly. */
+    switch (pEvent->type())
+    {
+        case VBoxDefs::ResizeEventType:
+        {
+            /* Some situations require framebuffer resize events to be ignored at all,
+             * leaving machine-window, machine-view and framebuffer sizes preserved: */
+            if (uisession()->isGuestResizeIgnored())
+                return true;
+
+            /* We are starting to perform machine-view resize: */
+            bool oldIgnoreMainwndResize = isMachineWindowResizeIgnored();
+            setMachineWindowResizeIgnored(true);
+
+            /* Get guest resize-event: */
+            UIResizeEvent *pResizeEvent = static_cast<UIResizeEvent*>(pEvent);
+
+            /* Perform framebuffer resize: */
+            frameBuffer()->resizeEvent(pResizeEvent);
+
+            /* Reapply maximum size restriction for machine-view: */
+            setMaximumSize(sizeHint());
+
+            /* Store the new size to prevent unwanted resize hints being sent back: */
+            storeConsoleSize(pResizeEvent->width(), pResizeEvent->height());
+
+            /* Perform machine-view resize: */
+            resize(pResizeEvent->width(), pResizeEvent->height());
+
+            /* Let our toplevel widget calculate its sizeHint properly. */
+#ifdef Q_WS_X11
+            /* We use processEvents rather than sendPostedEvents & set the time out value to max cause on X11 otherwise
+             * the layout isn't calculated correctly. Dosn't find the bug in Qt, but this could be triggered through
+             * the async nature of the X11 window event system. */
+            QCoreApplication::processEvents(QEventLoop::AllEvents, INT_MAX);
+#else /* Q_WS_X11 */
+            QCoreApplication::sendPostedEvents(0, QEvent::LayoutRequest);
+#endif /* Q_WS_X11 */
+
+#ifdef Q_WS_MAC
+            machineLogic()->updateDockIconSize(screenId(), pResizeEvent->width(), pResizeEvent->height());
+#endif /* Q_WS_MAC */
+
+            /* Update mouse cursor shape: */
+            updateMouseCursorShape();
+
+            /* May be we have to restrict minimum size? */
+            maybeRestrictMinimumSize();
+
+            /* Update machine-view sliders: */
+            updateSliders();
+
+            /* Normalize geometry: */
+            normalizeGeometry(true /* adjustPosition */);
+
+            /* Report to the VM thread that we finished resizing */
+            session().GetConsole().GetDisplay().ResizeCompleted(screenId());
+
+            /* We are finishing to perform machine-view resize: */
+            setMachineWindowResizeIgnored(oldIgnoreMainwndResize);
+
+            /* Make sure that all posted signals are processed: */
+            qApp->processEvents();
+
+            /* We also recalculate the desktop geometry if this is determined
+             * automatically.  In fact, we only need this on the first resize,
+             * but it is done every time to keep the code simpler. */
+            calculateDesktopGeometry();
+
+            /* Emit a signal about guest was resized: */
+            emit resizeHintDone();
+
+            return true;
+        }
+
 #ifndef Q_WS_MAC
-    switch (pEvent->type())
-    {
+        /* We don't want this on the Mac, cause there the menu bar isn't within the
+         * window and popping up a menu there looks really ugly. */
         case QEvent::KeyPress:
         case QEvent::KeyRelease:
@@ -186,9 +258,12 @@
                     pEvent->ignore();
             }
+
+            break;
         }
+#endif /* !Q_WS_MAC */
+
         default:
             break;
     }
-#endif /* !Q_WS_MAC */
     return UIMachineView::event(pEvent);
 }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp	(revision 30258)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp	(revision 30259)
@@ -161,4 +161,74 @@
         }
 
+        case VBoxDefs::ResizeEventType:
+        {
+            /* Some situations require framebuffer resize events to be ignored at all,
+             * leaving machine-window, machine-view and framebuffer sizes preserved: */
+            if (uisession()->isGuestResizeIgnored())
+                return true;
+
+            /* We are starting to perform machine-view resize: */
+            bool oldIgnoreMainwndResize = isMachineWindowResizeIgnored();
+            setMachineWindowResizeIgnored(true);
+
+            /* Get guest resize-event: */
+            UIResizeEvent *pResizeEvent = static_cast<UIResizeEvent*>(pEvent);
+
+            /* Perform framebuffer resize: */
+            frameBuffer()->resizeEvent(pResizeEvent);
+
+            /* Reapply maximum size restriction for machine-view: */
+            setMaximumSize(sizeHint());
+
+            /* Store the new size to prevent unwanted resize hints being sent back: */
+            storeConsoleSize(pResizeEvent->width(), pResizeEvent->height());
+
+            /* Perform machine-view resize: */
+            resize(pResizeEvent->width(), pResizeEvent->height());
+
+            /* Let our toplevel widget calculate its sizeHint properly. */
+#ifdef Q_WS_X11
+            /* We use processEvents rather than sendPostedEvents & set the time out value to max cause on X11 otherwise
+             * the layout isn't calculated correctly. Dosn't find the bug in Qt, but this could be triggered through
+             * the async nature of the X11 window event system. */
+            QCoreApplication::processEvents(QEventLoop::AllEvents, INT_MAX);
+#else /* Q_WS_X11 */
+            QCoreApplication::sendPostedEvents(0, QEvent::LayoutRequest);
+#endif /* Q_WS_X11 */
+
+#ifdef Q_WS_MAC
+            machineLogic()->updateDockIconSize(screenId(), pResizeEvent->width(), pResizeEvent->height());
+#endif /* Q_WS_MAC */
+
+            /* Update mouse cursor shape: */
+            updateMouseCursorShape();
+
+            /* Update machine-view sliders: */
+            updateSliders();
+
+            /* Report to the VM thread that we finished resizing */
+            session().GetConsole().GetDisplay().ResizeCompleted(screenId());
+
+            /* We are finishing to perform machine-view resize: */
+            setMachineWindowResizeIgnored(oldIgnoreMainwndResize);
+
+            /* Make sure that all posted signals are processed: */
+            qApp->processEvents();
+
+            /* We also recalculate the desktop geometry if this is determined
+             * automatically.  In fact, we only need this on the first resize,
+             * but it is done every time to keep the code simpler. */
+            calculateDesktopGeometry();
+
+            /* Emit a signal about guest was resized: */
+            emit resizeHintDone();
+
+            /* Unlock after processing guest resize event: */
+            if (m_pSyncBlocker && m_pSyncBlocker->isRunning())
+                m_pSyncBlocker->quit();
+
+            return true;
+        }
+
         case QEvent::KeyPress:
         case QEvent::KeyRelease:
@@ -175,13 +245,6 @@
                     pEvent->ignore();
             }
-        }
-
-        case VBoxDefs::ResizeEventType:
-        {
-            /* Unlock after processing guest resize event: */
-            bool fResult = UIMachineView::event(pEvent);
-            if (m_pSyncBlocker && m_pSyncBlocker->isRunning())
-                m_pSyncBlocker->quit();
-            return fResult;
+
+            break;
         }
 
