From bb5ddb412c089c83a10ee1dcb852b9e50e8f5d2e Mon Sep 17 00:00:00 2001 From: Zhang Dingyuan Date: Tue, 9 Jan 2024 10:11:36 +0800 Subject: [PATCH] fix: fix magnifying glass on multi outputs sync from waylib 0574fff261b06bdf80fc18639b38a1343ba23ee1 Log: --- src/treeland/quick/qml/Main.qml | 3 ++- src/treeland/quick/qml/OutputDelegate.qml | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/treeland/quick/qml/Main.qml b/src/treeland/quick/qml/Main.qml index 53836e11..5cfc3ccd 100644 --- a/src/treeland/quick/qml/Main.qml +++ b/src/treeland/quick/qml/Main.qml @@ -51,7 +51,8 @@ Item { id: backend onOutputAdded: function(output) { - output.forceSoftwareCursor = true // Test + if (!backend.hasDrm) + output.forceSoftwareCursor = true // Test TreeLandHelper.allowNonDrmOutputAutoChangeMode(output) QmlHelper.outputManager.add({waylandOutput: output}) diff --git a/src/treeland/quick/qml/OutputDelegate.qml b/src/treeland/quick/qml/OutputDelegate.qml index 7fa45fdd..67287769 100644 --- a/src/treeland/quick/qml/OutputDelegate.qml +++ b/src/treeland/quick/qml/OutputDelegate.qml @@ -100,12 +100,14 @@ OutputItem { OutputViewport { readonly property OutputItem outputItem: waylandOutput.OutputItem.item + id: viewport root: true output: waylandOutput devicePixelRatio: outputViewport.devicePixelRatio TextureProxy { sourceItem: outputViewport + anchors.fill: parent } Item { @@ -135,6 +137,8 @@ OutputItem { smooth: false scale: 10 transformOrigin: Item.TopLeft + width: viewport.width + height: viewport.height function updatePosition() { const pos = outputItem.lastActiveCursorItem.mapToItem(outputViewport, Qt.point(0, 0))