diff options
author | Andreas Holzammer <andreas.holzammer@kdab.com> | 2015-01-23 13:50:07 +0100 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@theqtcompany.com> | 2015-01-29 09:30:05 +0000 |
commit | 4b707d3bde53dd6dd4c01a51c12f096faefbc5b2 (patch) | |
tree | 6c1c6fcc35cb4276ce5a733c4c94b91b2bfd5bda /src/plugins/platforms | |
parent | 03a40d3a46b078f6cf516e5a42ef2e11a5366a20 (diff) |
WINCE: Fix special case for toplevel
It looks like that WindowFromPoint does not
return same handle each time, hence
he then is in a endless loop. We don't need
to look for a child in a loop here for
Windows Embedded Compact.
Task-number: QTBUG-44073
Change-Id: Ic42d56616b29f293d187111588fde3947c15659c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/windows/qwindowscontext.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index ffa7f82d8e..99ba5463bf 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 |