fix(overlay): correct Hyprland fullscreen overlay alignment on Linux (#107)

This commit is contained in:
2026-06-01 02:12:16 -07:00
committed by GitHub
parent f1e260e996
commit 76f99e6518
15 changed files with 501 additions and 23 deletions
@@ -7,6 +7,22 @@ test('normalizeOverlayWindowBoundsForPlatform returns original geometry outside
assert.deepEqual(normalizeOverlayWindowBoundsForPlatform(geometry, 'linux', null), geometry);
});
test('normalizeOverlayWindowBoundsForPlatform compensates Linux content insets', () => {
assert.deepEqual(
normalizeOverlayWindowBoundsForPlatform(
{ x: 0, y: 0, width: 3440, height: 1440 },
'linux',
null,
{
isDestroyed: () => false,
getBounds: () => ({ x: 0, y: 0, width: 3440, height: 1440 }),
getContentBounds: () => ({ x: 0, y: 14, width: 3440, height: 1426 }),
},
),
{ x: 0, y: -14, width: 3440, height: 1454 },
);
});
test('normalizeOverlayWindowBoundsForPlatform returns original geometry on Windows when screen is unavailable', () => {
const geometry = { x: 150, y: 90, width: 1200, height: 675 };
assert.deepEqual(normalizeOverlayWindowBoundsForPlatform(geometry, 'win32', null), geometry);