You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows: a transparent window is opaque (no WS_EX_NOREDIRECTIONBITMAP) #415
On Windows, a transparent: true window is opaque: nothing behind it shows through.
use rune::{App,AppSpec,Color,Cx,El,WindowOptions, col};fnview(_:&(), _:&mutCx<()>) -> El{col().w_full().h_full().fill(Color::BLACK.alpha(0.5))}fnmain(){App::new(AppSpec::new("repro",(400.0,300.0), || (), view)).window_options(WindowOptions{transparent:true, ..Default::default()}).run();}
Expected: the desktop through the window, darkened by half. Actual: flat gray.
Why
WindowOptions::attributes (crates/rune/src/windows.rs) never calls with_no_redirection_bitmap(true), so the window keeps an opaque redirection bitmap under its DirectComposition swapchain. Overlays already set it (overlay.rs:778), which is why they work.
The same cause also hits WindowOptions::overlay(display) windows. They go through WindowOptions::attributes too, so a full-display overlay draws as an opaque white sheet over the whole display.
Repro: run examples/overlay at a4e5bea. A DXGI Desktop Duplication capture shows the whole display white, with only the green stroke on top. The result is the same with WGPU_ADAPTER_NAME set to the integrated adapter (AMD Radeon) or the discrete one (NVIDIA RTX 5070 Ti Laptop), and with RUNE_WHOLE_FRAMES=1.
Setup: Windows 11 (build 26200), a hybrid laptop with an AMD iGPU and an NVIDIA dGPU, one 2560×1600 display at 150%. Earlier, on the same machine with two external displays attached, the same example was transparent.
Fix: the change proposed above (with_no_redirection_bitmap(true) when transparent) fixes it here. After the change, the example and an app with one overlay per display both show the desktop through the overlay.
WindowOptions::attributes did not set WS_EX_NOREDIRECTIONBITMAP (with_no_redirection_bitmap(true)) for transparent windows on Windows, leaving an opaque GDI redirection bitmap behind the DirectComposition swapchain. Fixed on dev in #1458 (
Activity
fahreziadh commentedon Nov 13, 2026
The same cause also hits
WindowOptions::overlay(display)windows. They go throughWindowOptions::attributestoo, so a full-display overlay draws as an opaque white sheet over the whole display.Repro: run
examples/overlayata4e5bea. A DXGI Desktop Duplication capture shows the whole display white, with only the green stroke on top. The result is the same withWGPU_ADAPTER_NAMEset to the integrated adapter (AMD Radeon) or the discrete one (NVIDIA RTX 5070 Ti Laptop), and withRUNE_WHOLE_FRAMES=1.Setup: Windows 11 (build 26200), a hybrid laptop with an AMD iGPU and an NVIDIA dGPU, one 2560×1600 display at 150%. Earlier, on the same machine with two external displays attached, the same example was transparent.
Fix: the change proposed above (
with_no_redirection_bitmap(true)whentransparent) fixes it here. After the change, the example and an app with one overlay per display both show the desktop through the overlay.Hona commentedon Nov 23, 2026
WindowOptions::attributes did not set WS_EX_NOREDIRECTIONBITMAP (with_no_redirection_bitmap(true)) for transparent windows on Windows, leaving an opaque GDI redirection bitmap behind the DirectComposition swapchain. Fixed on dev in #1458 (