From f6a5d4a31352009f217ad0f373cf2f6286d5eb96 Mon Sep 17 00:00:00 2001 From: Nez21 Date: Tue, 21 May 2024 22:58:02 +0700 Subject: [PATCH] fix: truncate if offscreen --- .config/ags/modules/overview/overview_hyprland.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/ags/modules/overview/overview_hyprland.js b/.config/ags/modules/overview/overview_hyprland.js index e38648d16..ee1b4d5e1 100644 --- a/.config/ags/modules/overview/overview_hyprland.js +++ b/.config/ags/modules/overview/overview_hyprland.js @@ -61,7 +61,7 @@ export default (overviewMonitor = 0) => { if (y + h <= 0) x += (Math.floor(y / monitors[monitor].height) * monitors[monitor].height); else if (y < 0) { h = y + h; y = 0; } // Truncate if offscreen - if (x + w > monitors[monitor]) w = monitors[monitor] - x; + if (x + w > monitors[monitor].width) w = monitors[monitor].width - x; if (y + h > monitors[monitor].height) h = monitors[monitor].height - y; const iconName = substitute(c);