Skip to content

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

Fushan Wen requested to merge work/fuf/pressandhold into master

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.

Edited by Fushan Wen

Merge request reports