From aca9b22281bd9dce1ceef7f5b2e4b4458fa9132b Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sun, 5 Feb 2017 14:49:49 +0200 Subject: [PATCH] fix #118,raise window for hovering files over task --- plasmoid/contents/ui/MouseHandler.qml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/plasmoid/contents/ui/MouseHandler.qml b/plasmoid/contents/ui/MouseHandler.qml index d8194104a..d265e58fe 100644 --- a/plasmoid/contents/ui/MouseHandler.qml +++ b/plasmoid/contents/ui/MouseHandler.qml @@ -75,6 +75,7 @@ Item { onDragEnter:{ if(root.dragSource == null){ + onlyLaunchers = false; root.dropNewLauncher = true; var createLaunchers = event.mimeData.urls.every(function (item) { @@ -125,7 +126,7 @@ Item { //I use the ignoredItem in order to reduce the move calls as much //as possible if (tasksModel.sortMode == TaskManager.TasksModel.SortManual && root.dragSource && ignoredItem == null) { - var insertAt = TaskTools.insertIndexAt(above, event.x, event.y); + var insertAt = TaskTools.insertIndexAt(above, event.x, event.y); if (root.dragSource != above && root.dragSource.itemIndex != insertAt) { // console.log(root.dragSource.itemIndex + " - "+insertAt); @@ -136,11 +137,11 @@ Item { } else if (!root.dragSource && above && hoveredItem != above) { hoveredItem = above; root.dropNewLauncher = true; - // activationTimer.restart(); + activationTimer.restart(); } else if (!above) { root.dropNewLauncher = true; hoveredItem = null; - // activationTimer.stop(); + activationTimer.stop(); } } @@ -172,12 +173,16 @@ Item { repeat: false onTriggered: { - /* if (parent.hoveredItem.m.IsGroupParent === true) { - groupDialog.visualParent = parent.hoveredItem; - groupDialog.visible = true; + if (dropHandler.onlyLaunchers) { + return; + } + + if (parent.hoveredItem.m.IsGroupParent === true) { + // groupDialog.visualParent = parent.hoveredItem; + // groupDialog.visible = true; } else if (parent.hoveredItem.m.IsLauncher !== true) { tasksModel.requestActivate(parent.hoveredItem.modelIndex()); - }*/ + } } } }