thumbnail: don't request the window stream until we first need it

This way we don't add more pressure upon application startup time. It
doesn't seem noticeable when showing the windows overview.
This commit is contained in:
Aleix Pol 2020-12-10 03:49:35 +01:00
parent b7c508beb7
commit 3ca6a2d395

View file

@ -26,9 +26,14 @@ TaskManager.PipeWireSourceItem {
visible: Window.visibility !== Window.Hidden
nodeId: waylandItem.nodeId
onVisibleChanged: {
if (visible && waylandItem.uuid.length === 0) {
waylandItem.uuid = model.WinIdList[0]
}
}
TaskManager.ScreencastingRequest {
id: waylandItem
uuid: model.WinIdList[0]
}
}