summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edmundson <kde@davidedmundson.co.uk>2017-02-07 13:10:45 (GMT)
committerDavid Edmundson <kde@davidedmundson.co.uk>2017-02-08 15:41:53 (GMT)
commit8709b7edd5d17d2369e8ca4d261ec186387fa20e (patch)
tree1a5fb74087b0103b786593f37e8b5d07beba12b8
parentfcff42d7b7d93ff40913b845aa402ad30d6b74e6 (diff)
Reverse TaskManager DragDrop to blacklist Plasma instead of whitelisting URLs
Summary: A previous patch made the task manager only accept drag events which contained URL lists or internal taskmanager mimedata in order to make it easier to drag applets onto the panel. This broke a feature where you can drag arbitrary mimedata between windows and hovering above a task will raise that window. This patch reverses the logic to only ignore plasmoids, and accept all other drag/drops. BUG: 375871 FIXED-IN: 5.9.2 Test Plan: Dragged applet from Widget explorer onto task manager and the task manager moved to the side to allow a drop. set sorting to manual and moved a task Dragged some text onto a task, and that window raised immediately Reviewers: #plasma Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D4476
-rw-r--r--applets/taskmanager/package/contents/ui/MouseHandler.qml15
1 files changed, 5 insertions, 10 deletions
diff --git a/applets/taskmanager/package/contents/ui/MouseHandler.qml b/applets/taskmanager/package/contents/ui/MouseHandler.qml
index a02f021..720ce01 100644
--- a/applets/taskmanager/package/contents/ui/MouseHandler.qml
+++ b/applets/taskmanager/package/contents/ui/MouseHandler.qml
@@ -68,14 +68,9 @@ Item {
//ignore anything that is neither internal to TaskManager or a URL list
onDragEnter: {
- if (event.mimeData.formats.indexOf("application/x-orgkdeplasmataskmanager_taskbuttonitem") >= 0) {
- return;
- }
-
- if (event.mimeData.hasUrls) {
- return;
+ if (event.mimeData.formats.indexOf("text/x-plasmoidservicename") >= 0) {
+ event.ignore();
}
- event.ignore();
}
onDragMove: {
@@ -126,8 +121,9 @@ Item {
}
onDrop: {
- // Reject internal drops.
- if (event.mimeData.formats.indexOf("application/x-orgkdeplasmataskmanager_taskbuttonitem") >= 0) {
+ // Reject plasmoid drops.
+ if (event.mimeData.formats.indexOf("text/x-plasmoidservicename") >= 0) {
+ event.ignore();
return;
}
@@ -135,7 +131,6 @@ Item {
parent.urlsDropped(event.mimeData.urls);
return;
}
- event.ignore();
}
Timer {