mirror of
https://github.com/stablyai/orca.git
synced 2026-10-20 16:03:20 +00:00
macOS configured no vibrancy surface at all, and an opaque fill sat between the desktop and the terminal, so Background Opacity and Window Blur both looked like no-ops. Adds a platform-gated blur surface (`resolveMainWindowBlurSurface`, covering macOS vibrancy / Windows acrylic / Linux fallback) and a root class that drops the opaque fill so the opacity token reaches the compositor. > [!WARNING] > **This does not close #8797 — it is deliberately `Refs`, not `Fixes`.** > I measured it on macOS with a dedicated isolated profile, identical app state, same wallpaper and window geometry, native `screencapture`, toggling only `windowBackgroundBlur` with a restart between runs: > > | Region | Blur OFF | Blur ON | Mean abs diff | > | --- | --- | --- | --- | > | Terminal pane | RGB(48.0, 53.0, 61.0) | RGB(50.0, 55.0, 63.1) | 2.0 / 255 | > | Sidebar | RGB(46.3, 46.4, 46.4) | RGB(46.3, 46.4, 46.4) | 0 — pixel-identical | > > The renderer half provably works (`window-blur` class applied; `html`/`body`/`#root` compute to `rgba(0,0,0,0)`; `.xterm` at `rgba(40,44,52,0.55)`), but the native vibrancy never reaches the screen, so the setting is still not visibly effective. Most likely Electron keeps an opaque window backing without `transparent: true`, which #8482 removed on purpose. > > Kept because it is a correct, unit-tested prerequisite. Merge or hold at your discretion — one machine, one macOS version, external display. Refs #8797 Co-authored-by: Orca <help@stably.ai>
7 lines
318 B
TypeScript
7 lines
318 B
TypeScript
/** Root class that drops the app's opaque fill so the platform blur material behind the web contents shows (#8797). */
|
|
export const WINDOW_BLUR_ROOT_CLASS = 'window-blur'
|
|
|
|
export function applyWindowBlurRootClass(root: HTMLElement, enabled: boolean): void {
|
|
root.classList.toggle(WINDOW_BLUR_ROOT_CLASS, enabled)
|
|
}
|