diff --git a/components/mobileshell/qml/taskswitcher/Task.qml b/components/mobileshell/qml/taskswitcher/Task.qml index 83c63485..c0ac84d9 100644 --- a/components/mobileshell/qml/taskswitcher/Task.qml +++ b/components/mobileshell/qml/taskswitcher/Task.qml @@ -227,13 +227,10 @@ Item { // attempt to load window preview Loader { id: pipeWireLoader - active: (taskSwitcher.visible || taskSwitcher.tasksModel.taskReorderingEnabled) && MobileShell.MobileShellSettings.taskSwitcherPreviewsEnabled + active: MobileShell.MobileShellSettings.taskSwitcherPreviewsEnabled anchors.fill: parent source: Qt.resolvedUrl("./Thumbnail.qml") - asynchronous: true - - onLoaded: this.item.refresh() } // darken effect diff --git a/components/mobileshell/qml/taskswitcher/Thumbnail.qml b/components/mobileshell/qml/taskswitcher/Thumbnail.qml index 8fda0883..c47faf27 100644 --- a/components/mobileshell/qml/taskswitcher/Thumbnail.qml +++ b/components/mobileshell/qml/taskswitcher/Thumbnail.qml @@ -13,13 +13,14 @@ import org.kde.taskmanager 0.1 as TaskManager PipeWire.PipeWireSourceItem { id: root - visible: nodeId > 0 + visible: (taskSwitcher.visible || taskSwitcher.tasksModel.taskReorderingEnabled) + opacity: (nodeId > 0) ? 1 : 0 nodeId: waylandItem.nodeId readonly property alias uuid: waylandItem.uuid - function refresh() { - if (model.WinIdList) { + onVisibleChanged: { + if (model.WinIdList && visible) { waylandItem.uuid = model.WinIdList[0]; } }