bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
36.46k stars 3.6k forks source link

Add WS_CLIPCHILDREN support for Windows in bevy_winit #16544

Open nicholasc opened 14 hours ago

nicholasc commented 14 hours ago

What problem does this solve or what need does it fill?

The winit version used in Bevy now supports WS_CLIPCHILDREN for Windows. This is particularly useful when trying to render a Wry WebView for which the HTML content has a transparent background because it will prevent the Wry container from clipping the rendering surface used by Bevy. This is the last "obstacle" I see in order to fully/properly use HTML as a user interface layer for Bevy.

What solution would you like?

It could be to just add winit_window_attributes = winit_window_attributes.with_clip_children(false); here. It could also be a more "configurable" approach using Window settings. Not sure considering this is Windows only.

What alternative(s) have you considered?

I don't really see any other alternatives.

Additional context

N/A