-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.5.8
-
-
f9795bf4e (dev), 8a132a837 (6.10)
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) {
- relates to
-
QTBUG-115992 Window containing native windows window is excessively repainted on move
-
- Closed
-
-
QTBUG-97774 Win32: Window contents flicker a lot when resizing
-
- Closed
-
- replaces
-
QTBUG-115992 Window containing native windows window is excessively repainted on move
-
- Closed
-
For Gerrit Dashboard: QTBUG-132285 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
682675,4 | Windows QPA: Fix flicker when moving Windows with High DPI scaling | dev | qt/qtbase | Status: MERGED | +2 | 0 |
682927,2 | Windows QPA: Fix flicker when moving Windows with High DPI scaling | 6.10 | qt/qtbase | Status: MERGED | +2 | 0 |