From 856188127553a7aa70c2199a52c94889051d95b0 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Wed, 25 Jan 2017 18:19:24 +0200 Subject: [PATCH] improve publish tasks geometries --this improves the way tasks geometries are published for the windows. This improves the experience for the minimize kwin effects. With the old code there were many cases that the animation was broken --- containment/contents/ui/VisibilityManager.qml | 4 ---- containment/contents/ui/main.qml | 6 ++++++ plasmoid/contents/ui/TaskDelegate.qml | 6 +++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/containment/contents/ui/VisibilityManager.qml b/containment/contents/ui/VisibilityManager.qml index 8f21605e8..ea85c6b9a 100644 --- a/containment/contents/ui/VisibilityManager.qml +++ b/containment/contents/ui/VisibilityManager.qml @@ -73,10 +73,6 @@ Item{ } onNormalStateChanged: { - if(normalState && nowDock) { - nowDock.publishTasksGeometries(); - } - if (normalState) { root.updateAutomaticIconSize(); } diff --git a/containment/contents/ui/main.qml b/containment/contents/ui/main.qml index 4c5d5db77..37bf7bea0 100644 --- a/containment/contents/ui/main.qml +++ b/containment/contents/ui/main.qml @@ -855,6 +855,12 @@ DragDrop.DropArea { animationsNeedLength = Math.max(animationsNeedLength + step, 0); + //when need length animations are ended it would be a good idea + //to update the tasks geometries in the plasmoid + if(animationsNeedLength === 0 && nowDock) { + nowDock.publishTasksGeometries(); + } + visibilityManager.updateMaskArea(); } diff --git a/plasmoid/contents/ui/TaskDelegate.qml b/plasmoid/contents/ui/TaskDelegate.qml index eb69cf6b2..bc69527f0 100644 --- a/plasmoid/contents/ui/TaskDelegate.qml +++ b/plasmoid/contents/ui/TaskDelegate.qml @@ -170,6 +170,10 @@ MouseArea{ mainItemContainer.groupWindowRemoved(); } + if (windowsCount>=1) { + mainItemContainer.slotPublishGeometries(); + } + previousCount = windowsCount; } } @@ -667,7 +671,7 @@ MouseArea{ if (model.IsGroupParent) { if (windowSystem.compositingActive) { root.presentWindows(model.LegacyWinIdList); - } else { + } else { if ((windowsPreviewDlg.visualParent === mainItemContainer)&&(windowsPreviewDlg.visible)) { windowsPreviewDlg.hide(); } else {