[Containment Interface] Keep containment in RequiresAttentionStatus while context menu is open
This ensures the panel does not auto-hide then. It also forces a re-evaluation of auto-hide status when the menu closes, so even if we mess up with mouse grabbing, it should more reliably auto-hide afterwards. BUG: 344205 CCBUG: 351823 Differential Revision: https://phabricator.kde.org/D6527
This commit is contained in:
parent
ef9d99e83a
commit
f3dcff28b8
@ -1066,6 +1066,14 @@ void ContainmentInterface::mousePressEvent(QMouseEvent *event)
|
||||
return;
|
||||
}
|
||||
|
||||
// Bug 344205 keep panel visible while menu is open
|
||||
const auto oldStatus = m_containment->status();
|
||||
m_containment->setStatus(Plasma::Types::RequiresAttentionStatus);
|
||||
|
||||
connect(desktopMenu, &QMenu::aboutToHide, m_containment, [this, oldStatus] {
|
||||
m_containment->setStatus(oldStatus);
|
||||
});
|
||||
|
||||
KAcceleratorManager::manage(desktopMenu);
|
||||
|
||||
desktopMenu->popup(pos);
|
||||
|
Loading…
Reference in New Issue
Block a user