diff options
author | Yuhang Zhao <2546789017@qq.com> | 2021-12-04 13:56:17 +0800 |
---|---|---|
committer | Yuhang Zhao <2546789017@qq.com> | 2021-12-15 13:02:39 +0800 |
commit | 5d129426765871912b4f0b4ba77eef4b338d00a3 (patch) | |
tree | 94824e3bacf6ae6a2ed40ec84180237dd0a4ad94 /src/plugins/platforms/windows/qwindowscontext.cpp | |
parent | d2a0202cdab5827d3e6e25c4d1fcb30afbb12e16 (diff) |
Windows QPA: Correctly respond to WM_ERASEBKGND
According to Microsoft Docs [1], applications should
return non-zero in response to WM_ERASEBKGND if it
processes the message and erases the background and
that's indeed the case for Qt.
Although I can't see any visual difference, this patch
obeys the official documentation at least.
[1] https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-erasebkgnd
Pick-to: 6.3 6.2
Change-Id: I8aa0bfb25259013bfc2ca4074f05a97c7865159c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowscontext.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowscontext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index a9712d1b3d..fe5b017b27 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -1268,7 +1268,7 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, case QtWindows::GeometryChangingEvent: return platformWindow->handleGeometryChanging(&msg); case QtWindows::ExposeEvent: - return platformWindow->handleWmPaint(hwnd, message, wParam, lParam); + return platformWindow->handleWmPaint(hwnd, message, wParam, lParam, result); case QtWindows::NonClientMouseEvent: if ((d->m_systemInfo & QWindowsContext::SI_SupportsPointer) && platformWindow->frameStrutEventsEnabled()) return sessionManagerInteractionBlocked() || d->m_pointerHandler.translateMouseEvent(platformWindow->window(), hwnd, et, msg, result); |