Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp	(revision 50823)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp	(revision 50824)
@@ -22,4 +22,5 @@
 #include <QMouseEvent>
 #include <QTouchEvent>
+#include <QTimer>
 
 /* GUI includes: */
@@ -426,4 +427,19 @@
 }
 
+void UIMouseHandler::sltMaybeActivateHoveredWindow()
+{
+    /* Are we still have hovered window to activate? */
+    if (m_pHoveredWindow && !m_pHoveredWindow->isActiveWindow())
+    {
+        /* Activate it: */
+        m_pHoveredWindow->activateWindow();
+#ifdef Q_WS_X11
+        /* On X11 its not enough to just activate window if you
+         * want to raise it also, so we will make it separately: */
+        m_pHoveredWindow->raise();
+#endif /* Q_WS_X11 */
+    }
+}
+
 /* Mouse-handler constructor: */
 UIMouseHandler::UIMouseHandler(UIMachineLogic *pMachineLogic)
@@ -597,11 +613,12 @@
                         QApplication::activeWindow() != pWatchedWidget->window())
                     {
-                        /* Activating hovered machine window: */
-                        pWatchedWidget->window()->activateWindow();
-#ifdef Q_WS_X11
-                        /* On X11 its not enough to just activate window if you
-                         * want to raise it also, so we will make it separately: */
-                        pWatchedWidget->window()->raise();
-#endif /* Q_WS_X11 */
+                        /* Put request for hovered window activation in 300msec: */
+                        m_pHoveredWindow = pWatchedWidget->window();
+                        QTimer::singleShot(300, this, SLOT(sltMaybeActivateHoveredWindow()));
+                    }
+                    else
+                    {
+                        /* Revoke request for hovered window activation: */
+                        m_pHoveredWindow = 0;
                     }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h	(revision 50823)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h	(revision 50824)
@@ -25,4 +25,5 @@
 #include <QMap>
 #include <QRect>
+#include <QPointer>
 
 /* GUI includes: */
@@ -86,4 +87,7 @@
     virtual void sltMousePointerShapeChanged();
 
+    /** Activate hovered window if any. */
+    void sltMaybeActivateHoveredWindow();
+
 protected:
 
@@ -126,4 +130,7 @@
     QMap<ulong, QWidget*> m_viewports;
 
+    /** Hovered window to be activated. */
+    QPointer<QWidget> m_pHoveredWindow;
+
     /* Other mouse variables: */
     QPoint m_lastMousePos;
