From 8de9df02a2950b09c01942c61483e5feea639f54 Mon Sep 17 00:00:00 2001 From: Benny-png Date: Tue, 28 Jul 2026 12:07:50 +0300 Subject: [PATCH] Fix dock hover animation on monitors with a non-zero offset dock.struts.x (and .y in the vertical branch) was only ever assigned inside the `autohide_dash` branch, so with autohide disabled the strut actor kept its default position of 0. _isWithinDash() hit-tests the pointer against the strut rect, so on a multi-monitor layout where the dock's monitor has a non-zero offset the rect sits over a different monitor and the pointer is never considered to be inside the dock. Icon magnification therefore never triggers. This is invisible on a single-monitor setup because the offset is 0. Co-Authored-By: Claude Opus 5 --- animator.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/animator.js b/animator.js index e3d19be..b3463b8 100644 --- a/animator.js +++ b/animator.js @@ -1030,9 +1030,12 @@ export let Animator = class { dock.struts.height = dock._background.height; // X11 .. click through fix .. // dock.struts.width *= 1.25; + } else { + // Without this the strut rect keeps y=0 and lands on the wrong + // monitor whenever the dock's monitor has a non-zero y offset. + dock.struts.y = dock.y; } - // dock.struts.y = dock.y; if (dock._position == DockPosition.RIGHT) { dock.struts.x = dock.x + dock.width - dock.struts.width; } else { @@ -1051,9 +1054,12 @@ export let Animator = class { dock.struts.width = dock._background.width; // X11 .. click through fix .. // dock.struts.height *= 1.25; + } else { + // Without this the strut rect keeps x=0 and lands on the wrong + // monitor whenever the dock's monitor has a non-zero x offset. + dock.struts.x = dock.x; } - // dock.struts.x = dock.x; if (dock._position == DockPosition.BOTTOM) { dock.struts.y = dock.y + dock.height - dock.struts.height; } else {