feat: support for clip children on windows (#16545)
# Objective Support the parametrization of the WS_CLIPCHILDREN style on Windows. Fixes #16544 ## Solution Added a window configuration in bevy_winit to control the usage of the WS_CLIPCHILDREN style. ## Testing - Did you test these changes? If so, how? I did. I was able to create a Wry Webview with a transparent HTML document and was also able to see my Bevy scene behind the webview elements. - Are there any parts that need more testing? I don't believe so. I assume the option is extensively tested within winit itself. - How can other people (reviewers) test your changes? Is there anything specific they need to know? Test repositiory [here](https://github.com/nicholasc/bevy_wry_test). Bevy's path will need to be updated in the Cargo.toml - If relevant, what platforms did you test these changes on, and are there any important ones you can't test? This is a Windows specific issue. Should be tested accordingly. --------- Co-authored-by: jf908 <jf908@users.noreply.github.com>
This commit is contained in:
parent
dcff8f3ecb
commit
f2e00c8ed5
@ -291,6 +291,15 @@ pub struct Window {
|
||||
///
|
||||
/// - Only supported on Windows.
|
||||
pub skip_taskbar: bool,
|
||||
/// Sets whether the window should draw over its child windows.
|
||||
///
|
||||
/// If `true`, the window excludes drawing over areas obscured by child windows.
|
||||
/// If `false`, the window can draw over child windows.
|
||||
///
|
||||
/// ## Platform-specific
|
||||
///
|
||||
/// - Only supported on Windows.
|
||||
pub clip_children: bool,
|
||||
/// Optional hint given to the rendering API regarding the maximum number of queued frames admissible on the GPU.
|
||||
///
|
||||
/// Given values are usually within the 1-3 range. If not provided, this will default to 2.
|
||||
@ -451,6 +460,7 @@ impl Default for Window {
|
||||
window_theme: None,
|
||||
visible: true,
|
||||
skip_taskbar: false,
|
||||
clip_children: true,
|
||||
desired_maximum_frame_latency: None,
|
||||
recognize_pinch_gesture: false,
|
||||
recognize_rotation_gesture: false,
|
||||
|
@ -126,6 +126,8 @@ impl WinitWindows {
|
||||
use winit::platform::windows::WindowAttributesExtWindows;
|
||||
winit_window_attributes =
|
||||
winit_window_attributes.with_skip_taskbar(window.skip_taskbar);
|
||||
winit_window_attributes =
|
||||
winit_window_attributes.with_clip_children(window.clip_children);
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
|
Loading…
Reference in New Issue
Block a user