Part Revert "Trigger context menu on press" as this breaks xembedsniproxy
AbandonedPublic

Authored by davidedmundson on Feb 8 2017, 9:44 AM.

Details

Reviewers
None
Group Reviewers
Plasma
Summary

This part reverts commit b9af99140365c8c8cf4e3744af7e13b35c35fa18 which
changes plasmoids and SNI items to activate on mouse release instead of
mouse click.

This messes with xembedsniproxy which is relaying the mouse press
signals to the exembed client. Now at the time of relay, if the client
application queries the mouse state itself it's going to be wrong and
that breaks GTK.

BUG: 375930

Test Plan

Reproduced the issue with xchat before the patch
Now that context menu worked.

Diff Detail

Repository
R120 Plasma Workspace
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
davidedmundson retitled this revision from to Part Revert "Trigger context menu on press" as this breaks xembedsniproxy.
davidedmundson updated this object.
davidedmundson edited the test plan for this revision. (Show Details)
davidedmundson added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 8 2017, 9:44 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript

FFS. Phabricator is being mental twice in a row now and showing somethign completely different to what I have on my system.

I'll just put it here as a comment.

diff --git a/applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml b/applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml
index f83eeab186..6df5407e2c 100644

  • a/applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml

+++ b/applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml
@@ -78,6 +78,19 @@ AbstractItem {

    });
    break;
}

+ case Qt.RightButton: {
+ var service = statusNotifierSource.serviceForSource(DataEngineSource);
+ var operation = service.operationDescription("ContextMenu");
+ operation.x = pos.x;
+ operation.y = pos.y;
+
+ var job = service.startOperationCall(operation);
+ job.finished.connect(function () {
+ plasmoid.nativeInterface.showStatusNotifierContextMenu(job, taskIcon);
+ });
+
+ break;
+ }

case Qt.MiddleButton:
    var service = statusNotifierSource.serviceForSource(DataEngineSource);
    var operation = service.operationDescription("SecondaryActivate");

@@ -86,23 +99,10 @@ AbstractItem {

operation.y = pos.y;
service.startOperationCall(operation);
break;

+ break;

    }
}
  • onContextMenu: {
  • var pos = plasmoid.nativeInterface.popupPosition(taskIcon, 0, 0); -
  • var service = statusNotifierSource.serviceForSource(DataEngineSource);
  • var operation = service.operationDescription("ContextMenu");
  • operation.x = pos.x;
  • operation.y = pos.y; -
  • var job = service.startOperationCall(operation);
  • job.finished.connect(function () {
  • plasmoid.nativeInterface.showStatusNotifierContextMenu(job, taskIcon);
  • });
  • } - onWheel: { //don't send activateVertScroll with a delta of 0, some clients seem to break (kmix) if (wheel.angleDelta.y !== 0) {
broulik added a subscriber: broulik.Feb 8 2017, 9:59 AM

In AbstractItem.qml you need to emit the clicked signal also on right mouse button press, otherwise SNI completely cease to function. Since PlasmoidItem.qml already checks mouse button this is safe.

davidedmundson abandoned this revision.Feb 8 2017, 10:01 AM