diff --git a/lib/appmenuapplet.cpp b/lib/appmenuapplet.cpp --- a/lib/appmenuapplet.cpp +++ b/lib/appmenuapplet.cpp @@ -305,22 +305,20 @@ actionMenu->installEventFilter(this); } - setStatus(Plasma::Types::AcceptingInputStatus); actionMenu->winId();//create window handle actionMenu->windowHandle()->setTransientParent(ctx->window()); actionMenu->popup(pos); - //we can return to passive immediately, an autohide panel will stay open whilst - //any transient window is showing - setStatus(Plasma::Types::PassiveStatus); - if (view() == FullView) { // hide the old menu only after showing the new one to avoid brief flickering // in other windows as they briefly re-gain focus QMenu *oldMenu = m_currentMenu; m_currentMenu = actionMenu; if (oldMenu && oldMenu != actionMenu) { + //! dont trigger initialization of index because there is a new menu created + disconnect(oldMenu, &QMenu::aboutToHide, this, &AppMenuApplet::onMenuAboutToHide); + oldMenu->hide(); } } diff --git a/package/contents/ui/main.qml b/package/contents/ui/main.qml --- a/package/contents/ui/main.qml +++ b/package/contents/ui/main.qml @@ -102,7 +102,15 @@ Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation - + Plasmoid.status: { + if (appmenu.appmenuOpened) { + return PlasmaCore.Types.NeedsAttentionStatus; + } else if (!appmenu.appmenuOpened && appmenu.appmenuEnabledAndNonEmpty){ + return PlasmaCore.Types.ActiveStatus; + } else { + return PlasmaCore.Types.PassiveStatus; + } + } // // MODEL