[System Tray] Fix regression on SNI fallback

As mentioned in https://bugs.kde.org/show_bug.cgi?id=365308
because of 27b1030756 we regressed on 5d5518455d.

This patch fixes it again.

Reviewers: #plasma, broulik, davidedmundson, mart

Reviewed By: mart

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D5270
wilder-5.14
Roman Gilg 9 years ago
parent 882fc8d0ff
commit ba260e72a1
  1. 25
      applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml

@ -73,22 +73,13 @@ AbstractItem {
if (!job.result) {
// On error try to invoke the context menu.
// Workaround primarily for apps using libappindicator.
contextMenu(mouse);
openContextMenu(pos);
}
});
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);
});
openContextMenu(pos);
break;
case Qt.MiddleButton:
@ -102,6 +93,18 @@ AbstractItem {
}
}
function openContextMenu(pos) {
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) {

Loading…
Cancel
Save