Merge remote-tracking branch 'origin/main' into add-hachidori-backend

This commit is contained in:
sudacode committed 2026-09-30 19:50:36 -07:00
commit 152d2c0626
4 files changed
+13 -4

No files matched your search

+2 -2
View File
@@ -82,7 +82,7 @@ test('shouldForceX11MpvBackend honors explicit x11 and auto modes', () => {
});
});
test('applyX11EnvOverrides strips Wayland hints and pins session type to x11', () => {
test('applyX11EnvOverrides strips Wayland hints, keeps Hyprland IPC, and pins session type to x11', () => {
const env = {
DISPLAY: ':1',
WAYLAND_DISPLAY: 'wayland-0',
@@ -94,7 +94,7 @@ test('applyX11EnvOverrides strips Wayland hints and pins session type to x11', (
assert.equal(result, env); // mutates in place
assert.equal(result.DISPLAY, ':1');
assert.equal(result.WAYLAND_DISPLAY, undefined);
assert.equal(result.HYPRLAND_INSTANCE_SIGNATURE, undefined);
assert.equal(result.HYPRLAND_INSTANCE_SIGNATURE, 'hypr');
assert.equal(result.SWAYSOCK, undefined);
assert.equal(result.XDG_SESSION_TYPE, 'x11');
});
+5 -1
View File
@@ -89,10 +89,14 @@ export function shouldForceX11MpvBackend(
/**
* Strip Wayland/compositor hints and pin the session type to X11 on the given env
* object (mutates in place and returns it) so a child mpv process picks XWayland.
*
* HYPRLAND_INSTANCE_SIGNATURE is kept: the overlay app inherits this env through the
* mpv plugin, and Hyprland still manages its XWayland windows. Without hyprctl access
* the overlay cannot lift Hyprland's fullscreen input block, so it stays visible but
* unclickable over fullscreen mpv.
*/
export function applyX11EnvOverrides(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv {
delete env.WAYLAND_DISPLAY;
delete env.HYPRLAND_INSTANCE_SIGNATURE;
delete env.SWAYSOCK;
env.XDG_SESSION_TYPE = 'x11';
return env;