From b264ae9888575df22e15d89a361845f84202106a Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Fri, 27 Jun 2025 21:37:15 +1000 Subject: internal: use hyprlandtoplevel --- modules/windowinfo/Preview.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/windowinfo/Preview.qml') diff --git a/modules/windowinfo/Preview.qml b/modules/windowinfo/Preview.qml index 96542c4..2619e8a 100644 --- a/modules/windowinfo/Preview.qml +++ b/modules/windowinfo/Preview.qml @@ -34,7 +34,7 @@ Item { Loader { anchors.centerIn: parent - active: !Hyprland.activeClient + active: !Hyprland.activeToplevel asynchronous: true sourceComponent: ColumnLayout { @@ -69,10 +69,10 @@ Item { anchors.centerIn: parent - captureSource: Hyprland.activeClient ? ToplevelManager.activeToplevel : null + captureSource: Hyprland.activeToplevel?.wayland ?? null live: true - constraintSize.width: parent.height * Math.min(screen.width / screen.height, Hyprland.activeClient.width / Hyprland.activeClient.height) + constraintSize.width: parent.height * Math.min(root.screen.width / root.screen.height, Hyprland.activeToplevel?.lastIpcObject.size[0] / Hyprland.activeToplevel?.lastIpcObject.size[1]) constraintSize.height: parent.height } } @@ -86,11 +86,11 @@ Item { animate: true text: { - const client = Hyprland.activeClient; + const client = Hyprland.activeToplevel; if (!client) return qsTr("No active client"); - const mon = Hyprland.monitors.values[Hyprland.activeClient.lastIpcObject.monitor]; + const mon = client.monitor; return qsTr("%1 on monitor %2 at %3, %4").arg(client.title).arg(mon.name).arg(client.x).arg(client.y); } } -- cgit v1.2.3-freya