Skip to content

Commit

Permalink
chore: Use attached property of WOutput to get outputDelegate
Browse files Browse the repository at this point in the history
Log: don't need search in outputManager
  • Loading branch information
wineee committed Dec 22, 2023
1 parent bb4eb37 commit 4f7ba09
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/treeland/quick/qml/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,6 @@ import TreeLand.Greeter
Item {
id :root

function getOutputDelegateFromWaylandOutput(output) {
let finder = function(props) {
if (!props.waylandOutput)
return false
if (props.waylandOutput === output)
return true
}

return QmlHelper.outputManager.getIf(outputDelegateCreator, finder)
}

WaylandServer {
id: server

Expand Down Expand Up @@ -163,7 +152,7 @@ Item {

output.enableAdaptiveSync(states[i].adaptive_sync_enabled);
if (!onlyTest) {
let outputDelegate = getOutputDelegateFromWaylandOutput(output);
let outputDelegate = output.OutputItem.item
outputDelegate.setTransform(states[i].transform)
outputDelegate.setScale(states[i].scale)
outputDelegate.setOutputPosition(states[i].x, states[i].y)
Expand Down

0 comments on commit 4f7ba09

Please sign in to comment.