mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
taskswitcher: fixes for opening phase
This commit is contained in:
parent
4b1c8dcc59
commit
a462ad4263
2 changed files with 18 additions and 7 deletions
|
|
@ -221,15 +221,20 @@ Item {
|
||||||
// app icon (behind window preview in-case it doesn't load)
|
// app icon (behind window preview in-case it doesn't load)
|
||||||
TaskIcon {
|
TaskIcon {
|
||||||
// decrease the opacity faster
|
// decrease the opacity faster
|
||||||
opacity: delegate.opacity
|
opacity: pipeWireLoader.item && pipeWireLoader.item.uuid ? 0 : delegate.opacity
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
}
|
}
|
||||||
|
|
||||||
// attempt to load window preview
|
// attempt to load window preview
|
||||||
Loader {
|
Loader {
|
||||||
id: pipeWireLoader
|
id: pipeWireLoader
|
||||||
|
active: taskSwitcher.visible || taskSwitcher.tasksModel.taskReorderingEnabled
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
source: Qt.resolvedUrl("./Thumbnail.qml")
|
source: Qt.resolvedUrl("./Thumbnail.qml")
|
||||||
|
|
||||||
|
asynchronous: true
|
||||||
|
|
||||||
|
onLoaded: this.item.refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
// darken effect
|
// darken effect
|
||||||
|
|
|
||||||
|
|
@ -11,19 +11,25 @@ import QtQuick.Window 2.2
|
||||||
import org.kde.taskmanager 0.1 as TaskManager
|
import org.kde.taskmanager 0.1 as TaskManager
|
||||||
|
|
||||||
TaskManager.PipeWireSourceItem {
|
TaskManager.PipeWireSourceItem {
|
||||||
visible: Window.visibility !== Window.Hidden
|
visible: false
|
||||||
nodeId: waylandItem.nodeId
|
nodeId: waylandItem.nodeId
|
||||||
|
|
||||||
onVisibleChanged: {
|
// Visible only if casting has begun
|
||||||
if (visible) {
|
onNodeIdChanged: {
|
||||||
|
visible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
readonly property string uuid: waylandItem.uuid
|
||||||
|
|
||||||
|
function refresh() {
|
||||||
if (model.WinIdList) {
|
if (model.WinIdList) {
|
||||||
waylandItem.uuid = model.WinIdList[0];
|
waylandItem.uuid = model.WinIdList[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
TaskManager.ScreencastingRequest {
|
TaskManager.ScreencastingRequest {
|
||||||
id: waylandItem
|
id: waylandItem
|
||||||
|
uuid: ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue