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>
This commit is contained in:
parent
953272eb45
commit
a4a51f6a64
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user