Commit a9d5ea2a authored by Konrad Materka's avatar Konrad Materka Committed by Fushan Wen
Browse files

applets/systemtray: Do not open context menu on mouse pressed for SNI

The prefered is to show context menu on mouse pressed event, not click,
but this causes few issues for SNI.

Some legacy applications still relies on XEmbed to show tray icon.
We use xembedsniproxy to relay the mouse press signals to the XEmbed client
but some applications (including GTK) validate the mouse state.
Mouse released state is expected, but as it is still pressed context
menu does not show.

BUG: 409768
FIXED-IN: 5.24.3

(cherry picked from commit a02d1ca2)
parent be50191b
Pipeline #142068 passed with stage
in 6 minutes and 26 seconds
......@@ -106,9 +106,6 @@ PlasmaCore.ToolTipArea {
if (mouse.button === Qt.RightButton) {
onPressAndHold: if (mouse.button === Qt.LeftButton) {
......@@ -34,6 +34,13 @@ AbstractItem {
applet.expanded = true
onPressed: {
// Only Plasmoids can show context menu on the mouse pressed event.
// SNI has few problems, for example legacy applications that still use XEmbed require mouse to be released.
if (mouse.button === Qt.RightButton) {
onContextMenu: if (applet) {
plasmoid.nativeInterface.showPlasmoidMenu(applet, 0,
plasmoidContainer.inHiddenLayout ? applet.height : 0);
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