[System Tray] Part Revert "Trigger context menu on press" as this breaks xembedsniproxy

This part reverts commit b9af991403 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
FIXED-IN: 5.9.2

Reviewed-By: David Edmundson
wilder-5.14
Kai Uwe Broulik 9 years ago
parent 2bef1c1b1f
commit 27b1030756
  1. 6
      applets/systemtray/package/contents/ui/items/AbstractItem.qml
  2. 27
      applets/systemtray/package/contents/ui/items/StatusNotifierItem.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) {

@ -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) {

Loading…
Cancel
Save