Windows QPA: Find window before invoking native filters
When handling WM_NCCALCSIZE in a global filter, the associated platform
window needs to be assigned to platformWindowPtr so that its frame
margins can be updated on return.
See also 3035400f36, which introduced the
platformWindowPtr out parameter for this purpose.
[ChangeLog][Platform Specific Changes][Windows] Fixed frameMargins for
WM_NCCALCSIZE when handled inside with QAbstractNativeEventFilter.
Change-Id: I7827b81d30a5c80dad591206a88712169dea0108
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
bb10
parent
d160809015
commit
2f94b7a991
|
|
@ -855,6 +855,9 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
|
|||
GetCursorPos(&msg.pt);
|
||||
}
|
||||
|
||||
QWindowsWindow *platformWindow = findPlatformWindow(hwnd);
|
||||
*platformWindowPtr = platformWindow;
|
||||
|
||||
// Run the native event filters.
|
||||
long filterResult = 0;
|
||||
QAbstractEventDispatcher* dispatcher = QAbstractEventDispatcher::instance();
|
||||
|
|
@ -863,8 +866,6 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
|
|||
return true;
|
||||
}
|
||||
|
||||
QWindowsWindow *platformWindow = findPlatformWindow(hwnd);
|
||||
*platformWindowPtr = platformWindow;
|
||||
if (platformWindow) {
|
||||
filterResult = 0;
|
||||
if (QWindowSystemInterface::handleNativeEvent(platformWindow->window(), d->m_eventType, &msg, &filterResult)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue