summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Uwe Broulik <kde@privat.broulik.de>2017-02-08 10:02:33 (GMT)
committerKai Uwe Broulik <kde@privat.broulik.de>2017-02-08 10:03:12 (GMT)
commit27b1030756002e91b60ba51483efe9c2c477d16e (patch)
treece39af01eaf755a0f810bbd73aed65d5d0a7a947
parent2bef1c1b1f10d31413388e459fdbca206872238d (diff)
[System Tray] Part Revert "Trigger context menu on press" as this breaks xembedsniproxy
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 FIXED-IN: 5.9.2 Reviewed-By: David Edmundson
-rw-r--r--applets/systemtray/package/contents/ui/items/AbstractItem.qml6
-rw-r--r--applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml27
2 files changed, 14 insertions, 19 deletions
diff --git a/applets/systemtray/package/contents/ui/items/AbstractItem.qml b/applets/systemtray/package/contents/ui/items/AbstractItem.qml
index 34d0891..d06face 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 b19dc53..4913835 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) {