Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5.8
Description
A fix done earlier solved flickering issue with Windows window: https://codereview.qt-project.org/c/qt/qtbase/+/512532 This solved the problem when normal scaling (100%) is used. If DPI scaling is different than 100% then the flickering is still there.
The attached example can be used to reproduce the problem. The issue can be seen when moving the window around with e.g. 125% scaling.
Would it be a valid fix to compare the window size using toNativeSizeConstrained() like shown below, as that seems to fix the issue?
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 5a33ed4bc37..eeb48c2f061 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -2763,7 +2763,7 @@ bool QWindowsWindow::handleGeometryChangingMessage(MSG *message, const QWindow * // Check the suggestedGeometry against the current one to only discard during // resize, and not a plain move. We also look for SWP_NOSIZE since that, too, // implies an identical size, and comparing QRects wouldn't work with null cx/cy - if (!(windowPos->flags & SWP_NOSIZE) && suggestedGeometry.size() != qWindow->geometry().size()) + if (!(windowPos->flags & SWP_NOSIZE) && suggestedGeometry.size() != toNativeSizeConstrained(qWindow->geometry().size(), qWindow->screen())) windowPos->flags |= SWP_NOCOPYBITS; if ((windowPos->flags & SWP_NOZORDER) == 0) {
Attachments
Issue Links
- replaces
-
QTBUG-115992 Window containing native windows window is excessively repainted on move
- Closed