Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp	(revision 50815)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp	(revision 50816)
@@ -164,4 +164,10 @@
 }
 #endif /* Q_WS_MAC */
+
+void UIMachineWindowFullscreen::sltRevokeFocus()
+{
+    /* Revoke stolen focus: */
+    m_pMachineView->setFocus();
+}
 
 void UIMachineWindowFullscreen::prepareMenu()
@@ -248,4 +254,5 @@
     connect(m_pMiniToolBar, SIGNAL(sigCloseAction()),
             gActionPool->action(UIActionIndexRuntime_Simple_Close), SLOT(trigger()));
+    connect(m_pMiniToolBar, SIGNAL(sigNotifyAboutFocusStolen()), this, SLOT(sltRevokeFocus()));
 }
 
@@ -345,12 +352,4 @@
     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);
-#endif /* Q_WS_WIN */
-
 #ifdef Q_WS_MAC
     /* ML and next using native stuff, so we can call for simple show(): */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h	(revision 50815)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h	(revision 50816)
@@ -70,4 +70,7 @@
 #endif /* RT_OS_DARWIN */
 
+    /** Revokes keyboard-focus. */
+    void sltRevokeFocus();
+
 private:
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp	(revision 50815)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp	(revision 50816)
@@ -69,4 +69,10 @@
         QTimer::singleShot(0, m_pMainMenu, SLOT(sltHighlightFirstAction()));
     }
+}
+
+void UIMachineWindowSeamless::sltRevokeFocus()
+{
+    /* Revoke stolen focus: */
+    m_pMachineView->setFocus();
 }
 
@@ -152,4 +158,5 @@
     connect(m_pMiniToolBar, SIGNAL(sigCloseAction()),
             gActionPool->action(UIActionIndexRuntime_Simple_Close), SLOT(trigger()));
+    connect(m_pMiniToolBar, SIGNAL(sigNotifyAboutFocusStolen()), this, SLOT(sltRevokeFocus()));
 }
 #endif /* !Q_WS_MAC */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h	(revision 50815)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h	(revision 50816)
@@ -45,4 +45,7 @@
     /* Popup main menu: */
     void sltPopupMainMenu();
+
+    /** Revokes keyboard-focus. */
+    void sltRevokeFocus();
 
 private:
Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp	(revision 50815)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp	(revision 50816)
@@ -193,9 +193,4 @@
     /* Simulate toolbar auto-hiding: */
     simulateToolbarAutoHiding();
-
-    /* Due to [probably] Qt bug QMdiSubWindow still
-     * can receive focus even if focus policy is Qt::NoFocus,
-     * We should return the focus to our parent: */
-    parentWidget()->setFocus();
 }
 
@@ -260,4 +255,6 @@
     m_pToolbar = new UIMiniToolBar;
     {
+        /* Make sure we have no focus: */
+        m_pToolbar->setFocusPolicy(Qt::NoFocus);
         /* Propagate known options to child: */
         m_pToolbar->setAutoHide(m_fAutoHide);
@@ -279,6 +276,6 @@
         m_pEmbeddedToolbar = m_pMdiArea->addSubWindow(m_pToolbar, Qt::Window | Qt::FramelessWindowHint);
         /* Make sure we have no focus: */
-        m_pToolbar->setFocusPolicy(Qt::NoFocus);
         m_pEmbeddedToolbar->setFocusPolicy(Qt::NoFocus);
+        m_pEmbeddedToolbar->installEventFilter(this);
     }
 
@@ -340,4 +337,17 @@
     if (m_fAutoHide)
         m_pHoverLeaveTimer->start();
+}
+
+bool UIRuntimeMiniToolBar::eventFilter(QObject *pWatched, QEvent *pEvent)
+{
+    /* Due to Qt bug QMdiArea can
+     * 1. steal focus from current application focus-widget
+     * 3. and even request focus stealing if QMdiArea hidden yet.
+     * We have to notify listeners about such facts.. */
+    if (pWatched && m_pEmbeddedToolbar && pWatched == m_pEmbeddedToolbar &&
+        pEvent->type() == QEvent::FocusIn)
+        emit sigNotifyAboutFocusStolen();
+    /* Call to base-class: */
+    return QWidget::eventFilter(pWatched, pEvent);
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.h	(revision 50815)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.h	(revision 50816)
@@ -64,4 +64,7 @@
     void sigHoverLeave();
 
+    /** Notifies listeners about we stole focus. */
+    void sigNotifyAboutFocusStolen();
+
 public:
 
@@ -109,4 +112,8 @@
     void enterEvent(QEvent *pEvent);
     void leaveEvent(QEvent *pEvent);
+
+    /** Filters @a pEvent if <i>this</i> object has been
+      * installed as an event-filter for the @a pWatched. */
+    bool eventFilter(QObject *pWatched, QEvent *pEvent);
 
     /* Helper: Hover stuff: */
