From a1c37462eebddf4ad7bc3192f1f3e9a3f7292b19 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 13 Mar 2019 11:24:48 +0100 Subject: Windows: Fix tooltip flicker on GL surfaces QPlatformWindow::initialGeometry() would assign a default height to the initial geometry of the QRollEffectClassWindow since it has height of 0. This causes the obtained geometry to not match and subsequently a geometry change being sent synchronously. Introduce a new flag QWindowPrivate::resizeAutomatic similar to the existing QWindowPrivate::positionAutomatic to prevent assigning a default size and pass through the geometry as is where required. Fixes: QTBUG-74176 Change-Id: I70c66490838a2c4dfe200ec86094d28bd984dd03 Reviewed-by: Kati Kankaanpaa Reviewed-by: Richard Moe Gustavsen --- src/plugins/platforms/windows/qwindowswindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/windows/qwindowswindow.cpp') diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 2abd1eef8b..0376e363f3 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1132,7 +1132,8 @@ QWindowCreationContext::QWindowCreationContext(const QWindow *w, // TODO: No concept of WA_wasMoved yet that would indicate a // CW_USEDEFAULT unless set. For now, assume that 0,0 means 'default' // for toplevels. - if (geometry.isValid()) { + if (geometry.isValid() + || !qt_window_private(const_cast(w))->resizeAutomatic) { frameX = geometry.x(); frameY = geometry.y(); const QMargins effectiveMargins = margins + customMargins; -- cgit v1.2.3