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>
This commit is contained in:
parent
03a40d3a46
commit
4b707d3bde
@ -675,6 +675,8 @@ static inline bool findPlatformWindowHelper(const POINT &screenPoint, unsigned c
|
|||||||
#ifndef Q_OS_WINCE
|
#ifndef Q_OS_WINCE
|
||||||
const HWND child = ChildWindowFromPointEx(*hwnd, point, cwexFlags);
|
const HWND child = ChildWindowFromPointEx(*hwnd, point, cwexFlags);
|
||||||
#else
|
#else
|
||||||
|
// Under Windows CE we don't use ChildWindowFromPointEx as it's not available
|
||||||
|
// and ChildWindowFromPoint does not work properly.
|
||||||
Q_UNUSED(cwexFlags)
|
Q_UNUSED(cwexFlags)
|
||||||
const HWND child = WindowFromPoint(point);
|
const HWND child = WindowFromPoint(point);
|
||||||
#endif
|
#endif
|
||||||
@ -683,7 +685,13 @@ static inline bool findPlatformWindowHelper(const POINT &screenPoint, unsigned c
|
|||||||
if (QWindowsWindow *window = context->findPlatformWindow(child)) {
|
if (QWindowsWindow *window = context->findPlatformWindow(child)) {
|
||||||
*result = window;
|
*result = window;
|
||||||
*hwnd = child;
|
*hwnd = child;
|
||||||
|
#ifndef Q_OS_WINCE
|
||||||
return true;
|
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 .
|
#ifndef Q_OS_WINCE // Does not have WS_EX_TRANSPARENT .
|
||||||
// QTBUG-40555: despite CWP_SKIPINVISIBLE, it is possible to hit on invisible
|
// QTBUG-40555: despite CWP_SKIPINVISIBLE, it is possible to hit on invisible
|
||||||
|
Loading…
x
Reference in New Issue
Block a user