diff options
| author | Gabriel Schneider <[email protected]> | 2026-08-28 16:12:01 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-09-01 08:30:41 -0300 |
| commit | 848ad99fa597387a85f75e752dc4c9e10f8c24f4 (patch) | |
| tree | 623ee400f6bec5e2a823e5a590dc4760a3084771 /src/config.zig | |
| parent | b3595e04e67708c3b060a15cbbbf2478d9e6241e (diff) | |
| download | pardes-848ad99fa597387a85f75e752dc4c9e10f8c24f4.tar.gz pardes-848ad99fa597387a85f75e752dc4c9e10f8c24f4.zip | |
macos fix
Diffstat (limited to 'src/config.zig')
| -rw-r--r-- | src/config.zig | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/config.zig b/src/config.zig index cbe75dea..1a3de86c 100644 --- a/src/config.zig +++ b/src/config.zig @@ -566,6 +566,32 @@ pub const gui_topbar_pane_border_px: u8 = 1; /// build that wants a deliberate accent can pin one here. pub const gui_topbar_pane_border_rgb: ?[3]u8 = null; +/// Open the SDL window with a transparent buffer, so that a theme declaring NO +/// background of its own (the curated `dark`, every vendored `*_transparent`) +/// shows the desktop through the grid instead of a colour this shell had to +/// invent. That is what the AppKit shell does over its NSVisualEffectView, and +/// on linux the compositor supplies the backdrop — a niri `background-effect +/// { blur true }` window rule, picom, whatever is running. +/// +/// OFF by default because it is not free, and the cost is structural rather +/// than ours: `SDL_ClaimWindowForGPUDevice` refuses a transparent window +/// outright ("The GPU API doesn't support transparent windows", SDL_gpu.c, +/// still upstream), because D3D12 has no transparent swapchain and the API +/// says no everywhere rather than only where it must. A transparent window +/// therefore has no swapchain to render into, and the frame reaches the screen +/// down the same readback-and-blit path a compositor that cannot back a Vulkan +/// swapchain already uses (`soft_present` in `src/gui/gui.zig`): one +/// GPU->CPU download plus one upload per PAINTED frame, measured at 1.2 ms for +/// 2240x1440 and 3.0 ms for 3840x2160 on an RTX 3050. Idle frames cost +/// nothing — this shell only paints when something changed — but an animation +/// at 60 Hz spends that every frame. +/// +/// With a theme that DOES bring a background this changes nothing visible: the +/// ground is painted at full alpha, exactly as an opaque window would. It +/// still pays the readback, because window transparency is fixed at creation +/// and a `Theme` command may reach a transparent theme later. +pub const gui_transparent: bool = false; + /// Touchpad drift guard, in ticks. A two-finger swipe that is MEANT to be /// vertical carries a little sideways drift, and the pad faithfully turns that /// drift into wheel_left/wheel_right — so a plain scroll slides the view |
