Minor improvement.

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2020-04-27 10:49:54 +08:00
parent 21a563a460
commit b94e534906
1 changed files with 6 additions and 0 deletions

View File

@ -763,6 +763,12 @@ bool WinNativeEventFilter::nativeEventFilter(const QByteArray &eventType,
->lpCreateParams; ->lpCreateParams;
m_lpSetWindowLongPtrW(msg->hwnd, GWLP_USERDATA, m_lpSetWindowLongPtrW(msg->hwnd, GWLP_USERDATA,
reinterpret_cast<LONG_PTR>(userData)); reinterpret_cast<LONG_PTR>(userData));
// Copied from MSDN without any modification:
// If you have changed certain window data using SetWindowLong,
// you must call SetWindowPos for the changes to take effect.
// Use the following combination for uFlags: SWP_NOMOVE |
// SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED.
updateWindow(msg->hwnd, true, false);
} }
*result = m_lpDefWindowProcW(msg->hwnd, msg->message, msg->wParam, *result = m_lpDefWindowProcW(msg->hwnd, msg->message, msg->wParam,
msg->lParam); msg->lParam);