diff --git a/applets/systemtray/package/contents/ui/items/AbstractItem.qml b/applets/systemtray/package/contents/ui/items/AbstractItem.qml index 34d0891a4..d06faceee 100644 --- a/applets/systemtray/package/contents/ui/items/AbstractItem.qml +++ b/applets/systemtray/package/contents/ui/items/AbstractItem.qml @@ -99,11 +99,7 @@ PlasmaCore.ToolTipArea { hoverEnabled: true drag.filterChildren: true acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton - onClicked: { - if (mouse.button !== Qt.RightButton) { - abstractItem.clicked(mouse) - } - } + onClicked: abstractItem.clicked(mouse) onPressed: { abstractItem.hideToolTip() if (mouse.button === Qt.RightButton) { diff --git a/applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml b/applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml index b19dc53a9..4913835cf 100644 --- a/applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml +++ b/applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml @@ -71,6 +71,19 @@ AbstractItem { service.startOperationCall(operation); 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"); @@ -82,20 +95,6 @@ AbstractItem { } } - 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) {