From 7c593c71124c26a1834bed09a37c21e2f00982e8 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sat, 14 Apr 2018 19:47:29 +0300 Subject: [PATCH] fix #977,improve geometries publishing --- plasmoid/package/contents/ui/main.qml | 1 - .../package/contents/ui/task/TaskDelegate.qml | 20 +++++++++++-------- .../animations/TaskRealRemovalAnimation.qml | 2 -- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml index 0b5a85e15..25af7555a 100644 --- a/plasmoid/package/contents/ui/main.qml +++ b/plasmoid/package/contents/ui/main.qml @@ -1122,7 +1122,6 @@ Item { property int tasksCount: tasksModel.count - property bool delayingRemoval: false property bool directRender: false // onTasksCountChanged: updateImplicits(); diff --git a/plasmoid/package/contents/ui/task/TaskDelegate.qml b/plasmoid/package/contents/ui/task/TaskDelegate.qml index c2b3053c4..cd2d0a46c 100644 --- a/plasmoid/package/contents/ui/task/TaskDelegate.qml +++ b/plasmoid/package/contents/ui/task/TaskDelegate.qml @@ -120,6 +120,10 @@ MouseArea{ property bool isWindow: (IsWindow === true) ? true : false property bool isZoomed: false + property bool canPublishGeometries: (isWindow || isStartup || isGroupParent) && visible && width>=root.iconSize && height>=root.iconSize + && !mainItemContainer.delayingRemove + && (wrapper.mScale===1 || wrapper.mScale===root.zoomFactor) //dont publish during zoomFactor + property bool pressed: false readonly property bool showAttention: isDemandingAttention && plasmoid.status === PlasmaCore.Types.RequiresAttentionStatus ? true : false @@ -474,6 +478,13 @@ MouseArea{ onPidChanged: updateAudioStreams() onHasAudioStreamChanged: updateAudioStreams() + onCanPublishGeometriesChanged: { + if (canPublishGeometries) { + slotPublishGeometries(); + taskInitComponent.createObject(mainItemContainer); + } + } + onHoveredIndexChanged: { var distanceFromHovered = Math.abs(index - icList.hoveredIndex); @@ -519,12 +530,6 @@ MouseArea{ } } - onIsWindowChanged: { - if (isWindow) { - taskInitComponent.createObject(mainItemContainer); - } - } - onIsMinimizedChanged: { checkWindowsStates(); } @@ -1162,8 +1167,7 @@ MouseArea{ function slotPublishGeometries() { //! this way we make sure that layouts that are in different activities that the current layout //! dont publish their geometries - if ((isWindow || isStartup || isGroupParent) && icList && !icList.delayingRemoval - && (wrapper.mScale===1 || wrapper.mScale===root.zoomFactor) //dont publish during zoomFactor + if ( canPublishGeometries && (!latteDock || (latteDock && currentLayout && latteDock.universalLayoutManager && currentLayout.name === latteDock.universalLayoutManager.currentLayoutName))) { diff --git a/plasmoid/package/contents/ui/task/animations/TaskRealRemovalAnimation.qml b/plasmoid/package/contents/ui/task/animations/TaskRealRemovalAnimation.qml index d8820679c..71225af47 100644 --- a/plasmoid/package/contents/ui/task/animations/TaskRealRemovalAnimation.qml +++ b/plasmoid/package/contents/ui/task/animations/TaskRealRemovalAnimation.qml @@ -46,7 +46,6 @@ SequentialAnimation { ScriptAction{ script:{ mainItemContainer.inAnimation = true; - icList.delayingRemoval = true; mainItemContainer.inAddRemoveAnimation = true; mainItemContainer.inRemoveStage = true; @@ -167,7 +166,6 @@ SequentialAnimation { root.signalAnimationsNeedLength(-1); mainItemContainer.inAnimation = false; - icList.delayingRemoval = false; if(mainItemContainer.launcherUrl===root.launcherForRemoval && mainItemContainer.isLauncher) root.launcherForRemoval="";