diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp index 8764f633f1..4bfd6f19a7 100644 --- a/src/widgets/kernel/qwidget_qpa.cpp +++ b/src/widgets/kernel/qwidget_qpa.cpp @@ -153,7 +153,6 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows) if ((windowType() == Qt::Popup)) qApp->d_func()->closePopup(this); - //### we don't have proper focus event handling yet if (this == QApplicationPrivate::active_window) QApplication::setActiveWindow(0); @@ -472,12 +471,7 @@ void QWidgetPrivate::hide_sys() } if (QWindow *window = q->windowHandle()) { window->setVisible(false); - } - - //### we don't yet have proper focus event handling - if (q == QApplicationPrivate::active_window) - QApplication::setActiveWindow(0); - + } } void QWidgetPrivate::setMaxWindowState_helper()