From 68673de641fa1d67fe5374e19d07a5b23dfe4504 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Mon, 30 Jun 2025 13:51:50 +0200 Subject: [PATCH] screenshot: fix window/layer positions for offset monitors (#1539) --- .config/quickshell/screenshot.qml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.config/quickshell/screenshot.qml b/.config/quickshell/screenshot.qml index f544f36bb..a855200d9 100644 --- a/.config/quickshell/screenshot.qml +++ b/.config/quickshell/screenshot.qml @@ -89,6 +89,8 @@ ShellRoot { required property var modelData readonly property HyprlandMonitor hyprlandMonitor: Hyprland.monitorFor(modelData) readonly property real monitorScale: hyprlandMonitor.scale + readonly property real monitorOffsetX: hyprlandMonitor.x + readonly property real monitorOffsetY: hyprlandMonitor.y property int activeWorkspaceId: hyprlandMonitor.activeWorkspace?.id ?? 0 property string screenshotPath: `${root.screenshotDir}/image-${modelData.name}` property real dragStartX: 0 @@ -437,8 +439,8 @@ ShellRoot { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } - x: modelData.at[0] - y: modelData.at[1] + x: modelData.at[0] - panelWindow.monitorOffsetX + y: modelData.at[1] - panelWindow.monitorOffsetY width: modelData.size[0] height: modelData.size[1] borderColor: root.windowBorderColor @@ -468,8 +470,8 @@ ShellRoot { animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } - x: modelData.at[0] - y: modelData.at[1] + x: modelData.at[0] - panelWindow.monitorOffsetX + y: modelData.at[1] - panelWindow.monitorOffsetY width: modelData.size[0] height: modelData.size[1] borderColor: root.windowBorderColor