diff --git a/shell/panelview.h b/shell/panelview.h --- a/shell/panelview.h +++ b/shell/panelview.h @@ -236,6 +236,7 @@ KWayland::Client::PlasmaShellSurface *m_shellSurface; QPointer m_lastScreen; QPointer m_screenToFollow; + QMetaObject::Connection m_transientWindowVisibleWatcher; static const int STRUTSTIMERDELAY = 200; }; diff --git a/shell/panelview.cpp b/shell/panelview.cpp --- a/shell/panelview.cpp +++ b/shell/panelview.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -613,6 +614,7 @@ void PanelView::restoreAutoHide() { bool autoHide = true; + disconnect(m_transientWindowVisibleWatcher); if (!edgeActivated()) { autoHide = false; @@ -626,6 +628,14 @@ else if (containment() && containment()->status() >= Plasma::Types::NeedsAttentionStatus && containment()->status() != Plasma::Types::HiddenStatus) { autoHide = false; + } else { + for(QWindow *window: qApp->topLevelWindows()) { + if (window->transientParent() == this && window->isVisible()) { + m_transientWindowVisibleWatcher = connect(window, &QWindow::visibleChanged, this, &PanelView::restoreAutoHide); + autoHide = false; + break; //if multiple are open, we will re-evaluate this expression after the first closes + } + } } setAutoHideEnabled(autoHide);