Restore WindowState when changing SurfaceType
Restore the WindowState, when a Window has to be recreated due to changed SurfaceType. Fixes: QTBUG-118194 Pick-to: 6.5 Change-Id: I40ba552cda9dfc8ab543611595c068f80b8fa1d6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit c88211d1e4ac12eb2ae4990703a4f73c7085d624) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
2c8d75ff60
commit
d2b109801e
@ -10871,8 +10871,10 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f)
|
||||
recreate = true;
|
||||
}
|
||||
if (recreate) {
|
||||
auto oldState = d->windowHandle(QWidgetPrivate::WindowHandleMode::Closest)->windowState();
|
||||
newtlw->destroy();
|
||||
newtlw->create();
|
||||
d->windowHandle(QWidgetPrivate::WindowHandleMode::Closest)->setWindowState(oldState);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user