summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowscontext.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-10 09:54:23 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-10 09:55:09 +0100
commit51ce5b482997f76b8890876b07337b29609728e5 (patch)
tree54f408028c7831428fca2772c6a909f2febffb54 /src/plugins/platforms/windows/qwindowscontext.cpp
parent51ba25e0fc89882e5021bed718de91d58f7f3907 (diff)
parentd6ce94ae6367337ade2c590f182b973e2bcfa98c (diff)
Merge remote-tracking branch 'origin/5.4.1' into 5.4
Diffstat (limited to 'src/plugins/platforms/windows/qwindowscontext.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
index c253a9605b..72bfeec143 100644
--- a/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
@@ -675,6 +675,8 @@ static inline bool findPlatformWindowHelper(const POINT &screenPoint, unsigned c
#ifndef Q_OS_WINCE
const HWND child = ChildWindowFromPointEx(*hwnd, point, cwexFlags);
#else
+// Under Windows CE we don't use ChildWindowFromPointEx as it's not available
+// and ChildWindowFromPoint does not work properly.
Q_UNUSED(cwexFlags)
const HWND child = WindowFromPoint(point);
#endif
@@ -683,7 +685,13 @@ static inline bool findPlatformWindowHelper(const POINT &screenPoint, unsigned c
if (QWindowsWindow *window = context->findPlatformWindow(child)) {
*result = window;
*hwnd = child;
+#ifndef Q_OS_WINCE
return true;
+#else
+// WindowFromPoint does not return same handle in two sequential calls, which leads
+// to an endless loop, but calling WindowFromPoint once is good enough.
+ return false;
+#endif
}
#ifndef Q_OS_WINCE // Does not have WS_EX_TRANSPARENT .
// QTBUG-40555: despite CWP_SKIPINVISIBLE, it is possible to hit on invisible