summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget.cpp
diff options
context:
space:
mode:
authorIlya Fedin <fedin-ilja2010@ya.ru>2022-08-24 16:49:04 +0400
committerIlya Fedin <fedin-ilja2010@ya.ru>2022-08-24 23:12:00 +0400
commita4a51f6a641f4bf0a863251d6d3e026d81de6280 (patch)
tree75197cec2b4b6f72d2e499284c82449048fca25f /src/widgets/kernel/qwidget.cpp
parent953272eb450e2d6b00128308bfc3ce4cacbb641d (diff)
Re-create TLW's window only when its surface type is really changed
Fixes: QTBUG-105017 Pick-to: 6.4 Change-Id: If5826172efb53b6df15dd3b7ba91b09d733cc77f Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r--src/widgets/kernel/qwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index b28dcfc6f2..2cd30794cd 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -10691,7 +10691,7 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f)
QWidget *newtlw = window();
if (oldtlw != newtlw) {
QSurface::SurfaceType surfaceType = QSurface::RasterSurface;
- if (q_evaluateRhiConfig(this, nullptr, &surfaceType)) {
+ if (q_evaluateRhiConfig(newtlw, nullptr, &surfaceType)) {
newtlw->d_func()->usesRhiFlush = true;
if (QWindow *w = newtlw->windowHandle()) {
if (w->surfaceType() != surfaceType) {