Commit a02d1ca2 authored by Konrad Materka's avatar Konrad Materka
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
parent d1155030
Pipeline #142067 passed with stage
in 6 minutes and 3 seconds
......@@ -117,9 +117,6 @@ PlasmaCore.ToolTipArea {
if (mouse.button === Qt.RightButton) {
onPressAndHold: if (mouse.button === Qt.LeftButton) {
......@@ -44,6 +44,13 @@ AbstractItem {
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