diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-05-18 11:07:04 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-05-19 10:55:54 +0000 |
commit | 6086c81e4d999d88ce4d412a20d250a219ab3c2c (patch) | |
tree | 94f8936ca97e705d3b634f1d6b582d0e370ef4e7 /src/plugins/platforms/windows/qwindowswindow.cpp | |
parent | e9628fbd391972d4ffe5882d283d512df7fa705c (diff) |
Windows QPA: Improve workaround for non-Areo theme GL rendering.
Reportedly, clearing the clip region is sufficient to fix the issue.
InvalidateRect() should be avoided when handling WM_PAINT as it
may cause events.
Task-number: QTBUG-7865
Change-Id: Id9a7c280fcc2c8242bb34c34e73e53c3146e7a6e
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowswindow.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index cf13de427e..9c6cb53365 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1568,11 +1568,12 @@ bool QWindowsWindow::handleWmPaint(HWND hwnd, UINT message, return false; PAINTSTRUCT ps; + BeginPaint(hwnd, &ps); + // Observed painting problems with Aero style disabled (QTBUG-7865). + // 5.8: Consider making it dependent on !DwmIsCompositionEnabled(). if (testFlag(OpenGLSurface) && testFlag(OpenGLDoubleBuffered)) - InvalidateRect(hwnd, 0, false); - - BeginPaint(hwnd, &ps); + SelectClipRgn(ps.hdc, NULL); // If the a window is obscured by another window (such as a child window) // we still need to send isExposed=true, for compatibility. |