Skip to content

馃崚applets/systemtray: press and hold to open context menu for plasmoids

Fushan Wen requested to merge work/cherry-pick-c3e30017 into Plasma/5.27

For SNI icons MouseArea in AbstractItem will emit pressAndHold signal when pressing an icon, but for Plasmoid icons the MouseArea in AbstractItem can't intercept mouse events because MouseArea in plasmoids will eat all events, so manually connect to "pressAndHold" signal in the MouseArea of a plasmoid to open its context menu on long press.

In the long term TapHandler should be preferred and replace MouseArea because it can specify accepted devices (touchscreen), since we don't really want long press to open context menu for mouse users.

(cherry picked from commit c3e30017)

Merge request reports