Skip to content

Commit

Permalink
fix: crash when remove outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
wineee authored and justforlxz committed Jan 9, 2024
1 parent e7374db commit 5953f34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/treeland/quick/qml/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Item {
treelandOutputManager.newOutput(output)
}
onOutputRemoved: function(output) {
output.OutputItem.item.invalidate()
QmlHelper.outputManager.removeIf(function(prop) {
return prop.waylandOutput === output
})
Expand Down
4 changes: 4 additions & 0 deletions src/treeland/quick/qml/OutputDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,8 @@ OutputItem {
function setScale(scale) {
onscreenViewport.setOutputScale(scale)
}

function invalidate() {
onscreenViewport.invalidate()
}
}

0 comments on commit 5953f34

Please sign in to comment.