Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.15.5
-
None
-
-
cb51ab41e8 (qt/qtbase/dev) cb51ab41e8 (qt/tqtc-qtbase/dev) 85d22b0c61 (qt/tqtc-qtbase/6.2) c241a206df (qt/qtbase/6.3) c241a206df (qt/tqtc-qtbase/6.3) c8cdc3eb96 (qt/qtbase/6.4) c8cdc3eb96 (qt/tqtc-qtbase/6.4) 964ba25ff8 (qt/tqtc-qtbase/5.15)
Description
\qtbase\src\plugins\platforms\windows\qwindowscontext.cpp
There is this line of code that causes an infinite loop if "parent"is not updated.
while (findPlatformWindowHelper(screenPoint, cwex_flags, this, &parent, &result)) {}
This is what happens if the line:
const HWND nonTransparentChild = ChildWindowFromPointEx(*hwnd, point, cwexFlags | CWP_SKIPTRANSPARENT);
returns 'nonTransparentChild' == *hwnd
(that is, the function returns the parent, and not null, and not a child. This is legal, according to the Microsoft ChildWindowFromPointEx description).
I have a case where this happens: the top-level window is a transparent window.
Possible solution that works for me: changing:
*result = nonTransparentWindow; *hwnd = nonTransparentChild;
To
*result = nonTransparentWindow; if (*hwnd == nonTransparentChild) return false; *hwnd = nonTransparentChild;
Attachments
For Gerrit Dashboard: QTBUG-103571 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
411949,3 | Windows: Account for not finding child windows when calling ChildWindowFromPointEx | dev | qt/qtbase | Status: MERGED | +2 | 0 |
420733,2 | Windows: Account for not finding child windows when calling ChildWindowFromPointEx | 6.4 | qt/qtbase | Status: MERGED | +2 | 0 |
420734,2 | Windows: Account for not finding child windows when calling ChildWindowFromPointEx | 6.3 | qt/qtbase | Status: MERGED | +2 | 0 |
420781,2 | Windows: Account for not finding child windows when calling ChildWindowFromPointEx | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
420782,2 | Windows: Account for not finding child windows when calling ChildWindowFromPointEx | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |