Index: trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 35926)
+++ trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 35940)
@@ -574,5 +574,6 @@
 VirtualBox_SOURCES.win += \
 	src/platform/win/VirtualBox.rc \
-	src/platform/win/UIDesktopServices_win.cpp
+	src/platform/win/UIDesktopServices_win.cpp \
+	src/platform/win/VBoxUtils-win.cpp
 
 VirtualBox_DEFS.darwin += VBOX_DARWIN_USE_NATIVE_CONTROLS
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp	(revision 35926)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp	(revision 35940)
@@ -843,57 +843,4 @@
     return result;
 }
-
-#ifdef Q_WS_WIN
-/* Enumerate visible top-most windows: */
-BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM /* lParam */)
-{
-    /* Ignore NULL HWNDs: */
-    if (!hWnd)
-        return TRUE;
-
-    /* Ignore hidden windows: */
-    if (!IsWindowVisible(hWnd))
-        return TRUE;
-
-    /* Get window style: */
-    LONG uStyle = GetWindowLong(hWnd, GWL_STYLE);
-    /* Ignore minimized windows: */
-    if (uStyle & WS_MINIMIZE)
-        return TRUE;
-
-    /* Get extended window style: */
-    LONG uExtendedStyle = GetWindowLong(hWnd, GWL_EXSTYLE);
-    /* Ignore non-top-most windows: */
-    if (!(uExtendedStyle & WS_EX_TOPMOST))
-        return TRUE;
-
-    /* Get that window rectangle: */
-    RECT rect;
-    GetWindowRect(hWnd, &rect);
-    VBoxGlobal::m_sTopMostRects << QRect(QPoint(rect.left, rect.top), QPoint(rect.right - 1, rect.bottom - 1));
-
-    /* Proceed to the next window: */
-    return TRUE;
-}
-
-/* static */
-QList<QRect> VBoxGlobal::m_sTopMostRects = QList<QRect>();
-
-/* static */
-const QRegion VBoxGlobal::areaCoveredByTopMostWindows()
-{
-    /* Prepare the top-most region: */
-    QRegion topMostRegion;
-    /* Initialize the list of the top-most rectangles: */
-    m_sTopMostRects.clear();
-    /* Populate the list of top-most rectangles: */
-    EnumWindows((WNDENUMPROC)EnumWindowsProc, 0);
-    /* Update the top-most region with top-most rectangles: */
-    for (int iRectIndex = 0; iRectIndex < m_sTopMostRects.size(); ++iRectIndex)
-        topMostRegion += m_sTopMostRects[iRectIndex];
-    /* Return top-most region: */
-    return topMostRegion;
-}
-#endif /* Q_WS_WIN */
 
 /**
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h	(revision 35926)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h	(revision 35940)
@@ -178,9 +178,4 @@
     const QRect availableGeometry(int iScreen = 0) const;
 
-#ifdef Q_WS_WIN
-    static QList<QRect> m_sTopMostRects;
-    static const QRegion areaCoveredByTopMostWindows();
-#endif /* Q_WS_WIN */
-
 #ifdef VBOX_WITH_DEBUGGER_GUI
     bool isDebuggerEnabled(CMachine &aMachine);
Index: trunk/src/VBox/Frontends/VirtualBox/src/platform/win/VBoxUtils-win.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/platform/win/VBoxUtils-win.cpp	(revision 35940)
+++ trunk/src/VBox/Frontends/VirtualBox/src/platform/win/VBoxUtils-win.cpp	(revision 35940)
@@ -0,0 +1,79 @@
+/* $Id$ */
+/** @file
+ *
+ * VBox frontends: Qt GUI ("VirtualBox"):
+ * Utility classes and functions for handling Win specific tasks
+ */
+
+/*
+ * Copyright (C) 2010-2011 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+/* Includes: */
+#include "VBoxUtils-win.h"
+
+/* Namespace for native window sub-system functions: */
+namespace NativeWindowSubsystem
+{
+    /* Enumerates visible always-on-top (top-most) windows: */
+    BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam);
+    /* Contain visible top-most-window rectangles: */
+    QList<QRect> topMostRects;
+}
+
+/* Enumerates visible always-on-top (top-most) windows: */
+BOOL CALLBACK NativeWindowSubsystem::EnumWindowsProc(HWND hWnd, LPARAM /* lParam */)
+{
+    /* Ignore NULL HWNDs: */
+    if (!hWnd)
+        return TRUE;
+
+    /* Ignore hidden windows: */
+    if (!IsWindowVisible(hWnd))
+        return TRUE;
+
+    /* Get window style: */
+    LONG uStyle = GetWindowLong(hWnd, GWL_STYLE);
+    /* Ignore minimized windows: */
+    if (uStyle & WS_MINIMIZE)
+        return TRUE;
+
+    /* Get extended window style: */
+    LONG uExtendedStyle = GetWindowLong(hWnd, GWL_EXSTYLE);
+    /* Ignore non-top-most windows: */
+    if (!(uExtendedStyle & WS_EX_TOPMOST))
+        return TRUE;
+
+    /* Get that window rectangle: */
+    RECT rect;
+    GetWindowRect(hWnd, &rect);
+    topMostRects << QRect(QPoint(rect.left, rect.top), QPoint(rect.right - 1, rect.bottom - 1));
+
+    /* Proceed to the next window: */
+    return TRUE;
+}
+
+/* Returns area covered by visible always-on-top (top-most) windows: */
+const QRegion NativeWindowSubsystem::areaCoveredByTopMostWindows()
+{
+    /* Prepare the top-most region: */
+    QRegion topMostRegion;
+    /* Initialize the list of the top-most rectangles: */
+    topMostRects.clear();
+    /* Populate the list of top-most rectangles: */
+    EnumWindows((WNDENUMPROC)EnumWindowsProc, 0);
+    /* Update the top-most region with top-most rectangles: */
+    for (int iRectIndex = 0; iRectIndex < topMostRects.size(); ++iRectIndex)
+        topMostRegion += topMostRects[iRectIndex];
+    /* Return top-most region: */
+    return topMostRegion;
+}
+
Index: trunk/src/VBox/Frontends/VirtualBox/src/platform/win/VBoxUtils-win.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/platform/win/VBoxUtils-win.h	(revision 35940)
+++ trunk/src/VBox/Frontends/VirtualBox/src/platform/win/VBoxUtils-win.h	(revision 35940)
@@ -0,0 +1,36 @@
+/** @file
+ *
+ * VBox frontends: Qt GUI ("VirtualBox"):
+ * Declarations of utility classes and functions for handling Win specific tasks
+ */
+
+/*
+ * Copyright (C) 2011 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+#ifndef __VBoxUtils_WIN_h__
+#define __VBoxUtils_WIN_h__
+
+/* Qt includes: */
+#include <QRegion>
+
+/* Platform includes: */
+#include "Windows.h"
+
+/* Namespace for native window sub-system functions: */
+namespace NativeWindowSubsystem
+{
+    /* Returns area covered by visible always-on-top (top-most) windows: */
+    const QRegion areaCoveredByTopMostWindows();
+}
+
+#endif /* __VBoxUtils_WIN_h__ */
+
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp	(revision 35926)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp	(revision 35940)
@@ -32,4 +32,8 @@
 #include "UIMachineView.h"
 #include "UIFrameBuffer.h"
+
+#ifdef Q_WS_WIN
+# include "VBoxUtils-win.h"
+#endif /* Q_WS_WIN */
 
 #ifdef Q_WS_X11
@@ -880,5 +884,5 @@
         /* Trim partial-viewport-rectangle by top-most windows: */
         QRegion viewportRegion(viewportRectangle);
-        QRegion topMostRegion(VBoxGlobal::areaCoveredByTopMostWindows());
+        QRegion topMostRegion(NativeWindowSubsystem::areaCoveredByTopMostWindows());
         viewportRegion -= topMostRegion;
         /* Check if partial-viewport-region consists of 1 rectangle: */
