diff options
Diffstat (limited to 'src/widgets/widgets/qmdiarea.cpp')
-rw-r--r-- | src/widgets/widgets/qmdiarea.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/widgets/widgets/qmdiarea.cpp b/src/widgets/widgets/qmdiarea.cpp index f32cd26478..c1817060dd 100644 --- a/src/widgets/widgets/qmdiarea.cpp +++ b/src/widgets/widgets/qmdiarea.cpp @@ -2640,7 +2640,11 @@ bool QMdiArea::eventFilter(QObject *object, QEvent *event) #endif // QT_CONFIG(tabbar) Q_FALLTHROUGH(); case QEvent::Hide: - d->isSubWindowsTiled = false; + // Do not reset the isSubWindowsTiled flag if the event is a spontaneous system window event. + // This ensures that tiling will be performed during the resizeEvent after an application + // window minimize (hide) and then restore (show). + if (!event->spontaneous()) + d->isSubWindowsTiled = false; break; #if QT_CONFIG(rubberband) case QEvent::Close: |