Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support for clip children on windows #16545

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions crates/bevy_window/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,15 @@ pub struct Window {
///
/// - Only supported on Windows.
pub skip_taskbar: bool,
/// Sets whether the window should clip its child windows to its client area.
///
/// If `true`, child windows will be clipped to the client area of this window.
/// If `false`, child windows can be drawn outside the client area.
///
/// ## 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.
Expand Down Expand Up @@ -427,6 +436,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,
Expand Down
2 changes: 2 additions & 0 deletions crates/bevy_winit/src/winit_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down