From bd68d5dbcc31c7894404d26beb6cac8b5ea9a7fd Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Fri, 8 Feb 2019 18:20:46 +0200 Subject: [PATCH] dont show Preview after activating task with click BUG: 404099 --- .../package/contents/ui/ToolTipDelegate2.qml | 2 +- plasmoid/package/contents/ui/main.qml | 9 ++--- .../package/contents/ui/task/TaskItem.qml | 34 +++++++++++-------- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/plasmoid/package/contents/ui/ToolTipDelegate2.qml b/plasmoid/package/contents/ui/ToolTipDelegate2.qml index 5113f6bf3..20b90a37e 100644 --- a/plasmoid/package/contents/ui/ToolTipDelegate2.qml +++ b/plasmoid/package/contents/ui/ToolTipDelegate2.qml @@ -163,7 +163,7 @@ PlasmaExtras.ScrollArea { //! Central Functionality function mouseIsInside(){ - var isInside = contentItemMouseArea.containsMouse || instancesContainMouse() || (parentTask && parentTask.containsMouse); + var isInside = contentItemMouseArea.containsMouse || instancesContainMouse(); if (isInside){ mainToolTip.containsMouse = true; diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml index 8ce65f437..9c2a1b698 100644 --- a/plasmoid/package/contents/ui/main.qml +++ b/plasmoid/package/contents/ui/main.qml @@ -539,7 +539,7 @@ Item { } function hide(debug){ - // console.log("on hide previews event called: "+debug); + // console.log("on hide previews event called: "+debug); if (latteView && signalSent) { //it is used to unblock dock hiding @@ -561,7 +561,7 @@ Item { return; } - // console.log("preview show called..."); + // console.log("preview show called..."); if ((!activeItem || (activeItem !== taskItem)) && !root.contextMenu) { //console.log("preview show called: accepted..."); @@ -1811,10 +1811,11 @@ Item { } function previewContainsMouse() { - if(toolTipDelegate && toolTipDelegate.containsMouse && toolTipDelegate.parentTask) + if(toolTipDelegate && toolTipDelegate.containsMouse && toolTipDelegate.parentTask) { return true; - else + } else { return false; + } } function containsMouse(){ diff --git a/plasmoid/package/contents/ui/task/TaskItem.qml b/plasmoid/package/contents/ui/task/TaskItem.qml index 6ea308ea9..b2ee09dc5 100644 --- a/plasmoid/package/contents/ui/task/TaskItem.qml +++ b/plasmoid/package/contents/ui/task/TaskItem.qml @@ -586,6 +586,21 @@ MouseArea{ showTitleTooltip(); } + //! show previews if enabled + if(root.showPreviews && !windowsPreviewDlg.visible && windowsPreviewDlg.activeItem !== taskItem){ + if (hoveredTimerObj) { + //! don't delay showing preview in normal states, + //! that is when the dock wasn't hidden + if (!hoveredTimerObj.running) { + hoveredTimerObj.start(); + } + } else { + if (!root.disableAllWindowsFunctionality) { + hoveredTimerObj = hoveredTimerComponent.createObject(taskItem); + } + } + } + if (root.latteView && root.latteView.isHalfShown) { return; } @@ -648,21 +663,6 @@ MouseArea{ return; } - //! show previews - if(root.showPreviews && !windowsPreviewDlg.visible && windowsPreviewDlg.activeItem !== taskItem){ - if (hoveredTimerObj) { - //! don't delay showing preview in normal states, - //! that is when the dock wasn't hidden - if (!hoveredTimerObj.running) { - hoveredTimerObj.start(); - } - } else { - if (!root.disableAllWindowsFunctionality) { - hoveredTimerObj = hoveredTimerComponent.createObject(taskItem); - } - } - } - if((inAnimation == false)&&(!root.taskInAnimation)&&(!root.disableRestoreZoom) && hoverEnabled){ if (icList.hoveredIndex === -1 && root.dockHoveredIndex ===-1) { root.startDirectRenderDelayerDuringEntering(); @@ -906,6 +906,8 @@ MouseArea{ tasksModel.requestActivate(taskIndex); } + + hidePreviewWindow(); //negative direction } else if (angle < -12) { if (isLauncher || root.disableAllWindowsFunctionality) { @@ -923,6 +925,8 @@ MouseArea{ tasksModel.requestActivate(taskIndex); } + + hidePreviewWindow(); } }