[Containment Interface] Keep containment in RequiresAttentionStatus while context menu is open
ClosedPublic

Authored by broulik on Jul 6 2017, 2:39 PM.

Details

Summary

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

Test Plan

Right clicked a couple of applets, panel stayed visible while the menu was open. It auto-hid again when I closed the menu.

Task Manager needs a separate patch but this should be fairly trivial, something like Plasmoid.status: contextMenu && contextMenu.status === PlasmaCore.Dialog.Open ? PlasmaCore.Types.RequiresAttentionStatus : PlasmaCore.Types.ActiveStatus

I tried meddling with focusWindow and applicationState but I never got a meaningful change in the two when the context menu closed, so I chose this crude approach

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Jul 6 2017, 2:39 PM
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptJul 6 2017, 2:39 PM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
broulik added inline comments.Jul 6 2017, 3:14 PM
src/scriptengines/qml/plasmoid/containmentinterface.cpp
1073 ↗(On Diff #16238)

Not sure if we should use this (and then check if m_containment as context or m_containment

mart accepted this revision.Jul 6 2017, 8:41 PM
mart added a subscriber: mart.
mart added inline comments.
src/scriptengines/qml/plasmoid/containmentinterface.cpp
1073 ↗(On Diff #16238)

should be the same

This revision is now accepted and ready to land.Jul 6 2017, 8:41 PM
This revision was automatically updated to reflect the committed changes.