Bug 360332

Summary: Regression: new system tray (master only) does not respond to left clicks with xembedsniproxy-using applications
Product: [Plasma] plasmashell Reporter: Luca Beltrame <lbeltrame>
Component: System TrayAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: kde, notmart, rdieter
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Luca Beltrame 2016-03-09 19:35:28 UTC
Currently, with the new system tray, left clicks are eaten at least with some of the applications which are embedded by xembedsniproxy. I've seen this with Claws Mail for the moment: clicking on the tray icon will not open the program window, while it used to happen with the old systray.
Applications like Skype seems to be unaffected.

The proxy does get the click, by the way:

kde.xembedsniproxy: Received click 1 with passed x*y 2196 1029

but somehow it's not reaching what it should reach.

Reproducible: Always

Steps to Reproduce:
1. Run a program which needs xembedsniproxy to display on systray and which should be shown on icon click (case in point: Claws Mail)
2. Click on icon

Actual Results:  
Nothing happens.

Expected Results:  
Program window should be shown.

openSUSE Tumbleweed with plasma-workspace at d050609.
Comment 1 David Edmundson 2016-03-09 20:53:06 UTC
This fixes it:

diff --git a/applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml b/applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml
index 9cded5d..8bc9567 100644
--- a/applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml
+++ b/applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml
@@ -69,13 +69,13 @@ AbstractItem {
         case Qt.LeftButton: {
             var service = statusNotifierSource.serviceForSource(DataEngineSource);
             var operation = service.operationDescription("Activate");
-            operation.x = pos.x;
+            operation.x = x;
 
             // kmix shows main window instead of volume popup if (parent.x, parent.y) == (0, 0), which is the case here.
             // I am passing a position right below the panel (assuming panel is at screen's top).
             // Plasmoids' popups are already shown below the panel, so this make kmix's popup more consistent
             // to them.
-            operation.y = pos.y + parent.height + 6;
+            operation.y = y;
             service.startOperationCall(operation);
             break;
         }
@@ -95,9 +95,9 @@ AbstractItem {
         case Qt.MiddleButton:
             var service = statusNotifierSource.serviceForSource(DataEngineSource);
             var operation = service.operationDescription("SecondaryActivate");
-            operation.x = pos.x;
+            operation.x = x;
 
-            operation.y = pos.y;
+            operation.y = y;
             service.startOperationCall(operation);
             break;
             break;


In rewrite someone is trying to work round dodgy clients, at the expense of screwing up everyone else.
Comment 2 Marco Martin 2016-03-15 10:46:12 UTC
David: can you push it?
Comment 3 David Edmundson 2016-03-15 17:06:46 UTC
Git commit 6f2c71cc947322adc0c8996326e991dbd081289d by David Edmundson.
Committed on 15/03/2016 at 17:06.
Pushed by davidedmundson into branch 'master'.

Fix mouse interaction with xmebed sni proxy applets in new tray

Workaround to make kmix behave better messed up other apps.
REVIEWED-BY: Marco Martin (in the bug report)

M  +3    -8    applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml

http://commits.kde.org/plasma-workspace/6f2c71cc947322adc0c8996326e991dbd081289d