Repository navigation
fix(window): transparent windows on Windows set WS_EX_NOREDIRECTIONBITMAP - #1458
Merged
Merged
Conversation
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #415
Root cause
WindowOptions::attributes(crates/rune/src/window/spec.rs) called.with_transparent(self.transparent)without settingWindowAttributesExtWindows::with_no_redirection_bitmap(true)on Windows.WS_EX_NOREDIRECTIONBITMAP, Win32 kept an opaque GDI redirection bitmap behind the DirectComposition swapchain (Dx12SwapchainKind::DxgiFromVisual), causing bothtransparent: truewindows andWindowOptions::overlay(display)windows to render opaque instead of compositing over the desktop (whereas overlays incrates/rune/src/overlay/lifetime.rsalready setwith_no_redirection_bitmap(true)).Changes
crates/rune/src/window/spec.rs: inWindowOptions::attributes, under#[cfg(target_os = "windows")], callattrs.with_no_redirection_bitmap(true)whenself.transparentis true. Opaque windows keep the redirection bitmap for GDI CPU-first startup (opens_on_cpuincrates/rune/src/window/win32/cpu_frame.rsalready excludes transparent windows).crates/rune/src/window/spec_tests.rs: addedwindows_transparent_attributes_disable_redirection_bitmapverifyingno_redirection_bitmapis false for opaque windows and true fortransparent: true,WindowOptions::overlay, andWindowOptions::launcher_panel.changelog/unreleased/2026-11-23-windows-transparent-redirection-bitmap.md: added unreleased changelog fragment.Verification
windows_transparent_attributes_disable_redirection_bitmapfailed before the fix and passed after (cargo test -p rune -p rune-mermaid -p rune-kit --features rune-kit/markdown,rune-kit/mermaid windows_transparent_attributes_disable_redirection_bitmap).cargo test -p rune -p rune-mermaid -p rune-kit --features rune-kit/markdown,rune-kit/mermaid window::spec(12 passed) andscripts/file-size.sh(0 errors).examples/overlayover DWM (cannot open GUI windows during automated runs).