From 546e949c9ea4933ddb94d3ee6012ac43ecc7669b Mon Sep 17 00:00:00 2001 From: Toshimichi0915 Date: Thu, 16 Jan 2025 01:07:08 +0900 Subject: [PATCH] Revert execution order and properly fix the code --- .config/ags/modules/overview/overview_hyprland.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/ags/modules/overview/overview_hyprland.js b/.config/ags/modules/overview/overview_hyprland.js index 2d51adfb8..bbdda34e5 100644 --- a/.config/ags/modules/overview/overview_hyprland.js +++ b/.config/ags/modules/overview/overview_hyprland.js @@ -65,12 +65,12 @@ export default () => { if (monitors.length - 1 < monitor) { monitor = monitors.length - 1; } - // Truncate if offscreen - if (x + w > monitors[monitor].width) w = monitors[monitor].width - x; - if (y + h > monitors[monitor].height) h = monitors[monitor].height - y; // Properly scale for multi monitors w *= monitors[overviewMonitor.value].width / monitors[monitor].width; h *= monitors[overviewMonitor.value].height / monitors[monitor].height; + // Truncate if offscreen + if (x + w > monitors[overviewMonitor.value].width) w = monitors[overviewMonitor.value].width - x; + if (y + h > monitors[overviewMonitor.value].height) h = monitors[overviewMonitor.value].height - y; if (c.length == 0) c = initialClass; const iconName = substitute(c);