diff --git a/containment/package/contents/ui/VisibilityManager.qml b/containment/package/contents/ui/VisibilityManager.qml index c88edff6e..281ff959b 100644 --- a/containment/package/contents/ui/VisibilityManager.qml +++ b/containment/package/contents/ui/VisibilityManager.qml @@ -247,8 +247,12 @@ Item{ Binding{ target: latteView property: "isTouchingTopViewAndIsBusy" - when: latteView + when: root.viewIsAvailable value: { + if (!root.viewIsAvailable) { + return false; + } + var isTouchingTopScreenEdge = (latteView.y === latteView.screenGeometry.y); var hasTopBorder = ((latteView.effects && (latteView.effects.enabledBorders & PlasmaCore.FrameSvg.TopBorder)) > 0); @@ -261,6 +265,10 @@ Item{ property: "isTouchingBottomViewAndIsBusy" when: latteView value: { + if (!root.viewIsAvailable) { + return false; + } + var latteBottom = latteView.y + latteView.height; var screenBottom = latteView.screenGeometry.y + latteView.screenGeometry.height; var isTouchingBottomScreenEdge = (latteBottom === screenBottom); @@ -514,7 +522,7 @@ Item{ ///test maskArea function updateMaskArea() { - if (!latteView || blockUpdateMask) { + if (!latteView || !root.viewIsAvailable || blockUpdateMask) { return; } @@ -522,7 +530,7 @@ Item{ var localY = 0; normalState = ((animations.needBothAxis.count === 0) && (animations.needLength.count === 0)) - || (latteView.visibility.isHidden && !latteView.visibility.containsMouse && animations.needThickness.count === 0); + || (latteView && latteView.visibility.isHidden && !latteView.visibility.containsMouse && animations.needThickness.count === 0); // debug maskArea criteria @@ -974,6 +982,10 @@ Item{ } function init() { + if (!root.viewIsAvailable) { + return; + } + inSlidingIn = true; if (slidingAnimationAutoHiddenOut.running) { @@ -993,7 +1005,7 @@ Item{ id: slidingInRealFloating PropertyAnimation { - target: latteView.positioner + target: latteView ? latteView.positioner : null property: "slideOffset" to: 0 duration: manager.animationSpeed @@ -1005,7 +1017,7 @@ Item{ id: slidingOutRealFloating PropertyAnimation { - target: latteView.positioner + target: latteView ? latteView.positioner : null property: "slideOffset" to: plasmoid.configuration.screenEdgeMargin duration: manager.animationSpeed @@ -1016,6 +1028,10 @@ Item{ Connections { target: root onHideThickScreenGapChanged: { + if (!latteView || !root.viewIsAvailable) { + return; + } + if (root.behaveAsPlasmaPanel && !latteView.visibility.isHidden && !inSlidingIn && !inSlidingOut && !inStartup) { if (hideThickScreenGap) { latteView.positioner.inSlideAnimation = true; diff --git a/containment/package/contents/ui/layouts/loaders/Tasks.qml b/containment/package/contents/ui/layouts/loaders/Tasks.qml index 3e144f62c..06429a729 100644 --- a/containment/package/contents/ui/layouts/loaders/Tasks.qml +++ b/containment/package/contents/ui/layouts/loaders/Tasks.qml @@ -31,11 +31,11 @@ Loader { TaskManager.TasksModel { id: tasksModel virtualDesktop: virtualDesktopInfo.currentDesktop - screenGeometry: latteView.screenGeometry + screenGeometry: latteView ? latteView.screenGeometry : Qt.rect(-1, -1, 0, 0) activity: activityInfo.currentActivity filterByVirtualDesktop: true - filterByScreen: true + filterByScreen:latteView ? true : false filterByActivity: true launchInPlace: true diff --git a/containment/package/contents/ui/main.qml b/containment/package/contents/ui/main.qml index be3a3bcbe..9928f36e9 100644 --- a/containment/package/contents/ui/main.qml +++ b/containment/package/contents/ui/main.qml @@ -104,6 +104,8 @@ Item { readonly property bool behaveAsDockWithMask: !behaveAsPlasmaPanel + readonly property bool viewIsAvailable: latteView && latteView.visibility && latteView.effects + property int viewType: { var staticLayout = (plasmoid.configuration.minLength === plasmoid.configuration.maxLength); diff --git a/indicators/org.kde.latte.plasma/package/ui/FrontLayer.qml b/indicators/org.kde.latte.plasma/package/ui/FrontLayer.qml index d0a37328d..2614dfc32 100644 --- a/indicators/org.kde.latte.plasma/package/ui/FrontLayer.qml +++ b/indicators/org.kde.latte.plasma/package/ui/FrontLayer.qml @@ -208,7 +208,7 @@ Item { svg: groupSvg elementId: elementForLocation(plasmoid.location) - readonly property QtObject groupSvg: indicator.resources.svgs.length > 0 ? indicator.resources.svgs[0] : null + readonly property QtObject groupSvg: indicator.resources && indicator.resources.svgs.length > 0 ? indicator.resources.svgs[0] : null function elementForLocation(location) { switch (location) { diff --git a/plasmoid/package/contents/ui/ParabolicManager.qml b/plasmoid/package/contents/ui/ParabolicManager.qml index ef3447c52..7ec330196 100644 --- a/plasmoid/package/contents/ui/ParabolicManager.qml +++ b/plasmoid/package/contents/ui/ParabolicManager.qml @@ -47,11 +47,6 @@ Item { updateTasksEdgesIndexes(); } - Component.onDestruction: { - parManager.sglUpdateLowerItemScale.disconnect(sltTrackLowerItemScale); - parManager.sglUpdateHigherItemScale.disconnect(sltTrackHigherItemScale); - } - function updateTasksEdgesIndexes() { var newFirstTask = firstRealTask(); var newLastTask = lastRealTask();