mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-31 13:50:05 -04:00
Add option to enable/disable WS_CLIPCHILDREN window style (#3212)
This commit is contained in:
@@ -315,6 +315,9 @@ pub trait WindowBuilderExtWindows {
|
||||
/// Enabling the shadow causes a thin 1px line to appear on the top of the window.
|
||||
fn with_undecorated_shadow(self, shadow: bool) -> Self;
|
||||
|
||||
/// This sets or removes `WS_CLIPCHILDREN` style.
|
||||
fn with_clip_children(self, flag: bool) -> Self;
|
||||
|
||||
/// Sets the color of the window border.
|
||||
///
|
||||
/// Supported starting with Windows 11 Build 22000.
|
||||
@@ -385,6 +388,12 @@ impl WindowBuilderExtWindows for WindowBuilder {
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn with_clip_children(mut self, flag: bool) -> Self {
|
||||
self.window.platform_specific.clip_children = flag;
|
||||
self
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn with_border_color(mut self, color: Option<Color>) -> Self {
|
||||
self.window.platform_specific.border_color = Some(color.unwrap_or(Color::NONE));
|
||||
|
||||
Reference in New Issue
Block a user