Commit 3a16cbe7 authored by Fushan Wen's avatar Fushan Wen 💬 Committed by Nate Graham
Browse files

shell/panelview: unfocus on the panel when clicking outside

When the panel is focused, clicking outside should make the panel
unfocused.

CCBUG: 453166
CCBUG: 352476
parent d2057d71
......@@ -91,6 +91,13 @@ PanelView::PanelView(ShellCorona *corona, QScreen *targetScreen, QWindow *parent
connect(this, &PanelView::locationChanged, this, &PanelView::restore);
connect(this, &PanelView::containmentChanged, this, &PanelView::refreshContainment);
// FEATURE 352476: cancel focus on the panel when clicking outside
connect(this, &PanelView::activeFocusItemChanged, this, [this] {
if (containment()->status() == Plasma::Types::AcceptingInputStatus && !activeFocusItem()) {
containment()->setStatus(Plasma::Types::PassiveStatus);
}
});
if (!m_corona->kPackage().isValid()) {
qCWarning(PLASMASHELL) << "Invalid home screen package";
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment