Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.4
-
None
Description
QWidget manages QApplication::activeWindow() via QApplication::setActiveWindow().
In some cases this is synced with the QWindow activation, via QApplicationPrivate::notifyActiveWindowChange, but in other cases QWidget will reset the active window on its own, without informing QWindow, e.g. in QWidgetPrivate::deactivateWidgetCleanup()
This causes issues when hiding a QWidget that was the active window, and then showing it again. The QWindow was never deactivated, hence the QWindow does not send an activation event again after showing. Which means that the manual reset that happens on hide() is never restored on show().
We may need to teach QWidget to pick up the QWindow state on show(), or to plumb the deactivation on show() via QWindow.