mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
taskswitcher: Improve performance of task preview loading
This commit is contained in:
parent
eafc2eca99
commit
1ae83644c8
2 changed files with 5 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue