QtGui: Don't set a screen to a child window
This is a partial revert of eaa3a9d010
Task-number: QTBUG-50081
Change-Id: Ic3dc4daa90d7a968a4ebf45d3029c99a12985686
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
bb10
parent
14a5a175ae
commit
f3114120f2
|
|
@ -609,18 +609,20 @@ void QWindow::setParent(QWindow *parent)
|
|||
}
|
||||
|
||||
QObject::setParent(parent);
|
||||
d->parentWindow = parent;
|
||||
|
||||
QPlatformWindow *parentPlatformWindow = parent ? parent->d_func()->platformWindow : Q_NULLPTR;
|
||||
|
||||
if (parentPlatformWindow)
|
||||
if (parent)
|
||||
d->disconnectFromScreen();
|
||||
else
|
||||
d->connectToScreen(newScreen);
|
||||
|
||||
if (d->platformWindow)
|
||||
d->platformWindow->setParent(parentPlatformWindow);
|
||||
|
||||
d->parentWindow = parent;
|
||||
if (d->platformWindow) {
|
||||
if (parent && parent->d_func()->platformWindow) {
|
||||
d->platformWindow->setParent(parent->d_func()->platformWindow);
|
||||
} else {
|
||||
d->platformWindow->setParent(0);
|
||||
}
|
||||
}
|
||||
|
||||
QGuiApplicationPrivate::updateBlockedStatus(this);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue