summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r--src/gui/kernel/qwindow.cpp25
1 files changed, 1 insertions, 24 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index ced39bbe10..b679dd9bfc 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -344,20 +344,14 @@ inline bool QWindowPrivate::windowRecreationRequired(QScreen *newScreen) const
inline void QWindowPrivate::disconnectFromScreen()
{
- if (topLevelScreen) {
- Q_Q(QWindow);
- QObject::disconnect(topLevelScreen, &QObject::destroyed, q, &QWindow::screenDestroyed);
+ if (topLevelScreen)
topLevelScreen = 0;
- }
}
void QWindowPrivate::connectToScreen(QScreen *screen)
{
- Q_Q(QWindow);
disconnectFromScreen();
topLevelScreen = screen;
- if (topLevelScreen)
- QObject::connect(topLevelScreen, &QObject::destroyed, q, &QWindow::screenDestroyed);
}
void QWindowPrivate::emitScreenChangedRecursion(QScreen *newScreen)
@@ -1712,23 +1706,6 @@ void QWindow::setScreen(QScreen *newScreen)
d->setTopLevelScreen(newScreen, true /* recreate */);
}
-void QWindow::screenDestroyed(QObject *object)
-{
- Q_D(QWindow);
- if (d->parentWindow || QGuiApplication::closingDown())
- return;
- if (object == static_cast<QObject *>(d->topLevelScreen)) {
- const bool wasVisible = isVisible();
- setScreen(0);
- // destroy() might have hidden our window, show it again.
- // This might not be the best behavior if the new screen isn't a virtual sibling
- // of the old one. This can be removed once platform plugins have the power to
- // update the QScreen of its QWindows itself.
- if (wasVisible && d->platformWindow)
- setVisible(true);
- }
-}
-
/*!
\fn QWindow::screenChanged(QScreen *screen)