mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-28 07:33:14 -04:00
windows feature WS_EX_NOREDIRECTIONBITMAP (#575)
* set WS_EX_NOREDIRECTIONBITMAP * add CHANGELOG.md * more flexibility. * Skip DwmEnableBlurBehindWindow if no_redirection_bitmap is enabled.
This commit is contained in:
committed by
Francesca Frangipane
parent
8f394f117b
commit
047c67baf3
@@ -11,6 +11,7 @@ pub use self::window::Window;
|
||||
pub struct PlatformSpecificWindowBuilderAttributes {
|
||||
pub parent: Option<HWND>,
|
||||
pub taskbar_icon: Option<::Icon>,
|
||||
pub no_redirection_bitmap: bool,
|
||||
}
|
||||
|
||||
unsafe impl Send for PlatformSpecificWindowBuilderAttributes {}
|
||||
|
||||
@@ -888,6 +888,9 @@ unsafe fn init(
|
||||
if attributes.always_on_top {
|
||||
ex_style |= winuser::WS_EX_TOPMOST;
|
||||
}
|
||||
if pl_attribs.no_redirection_bitmap {
|
||||
ex_style |= winuser::WS_EX_NOREDIRECTIONBITMAP;
|
||||
}
|
||||
|
||||
// adjusting the window coordinates using the style
|
||||
winuser::AdjustWindowRectEx(&mut rect, style, 0, ex_style);
|
||||
@@ -999,7 +1002,7 @@ unsafe fn init(
|
||||
};
|
||||
|
||||
// making the window transparent
|
||||
if attributes.transparent {
|
||||
if attributes.transparent && !pl_attribs.no_redirection_bitmap {
|
||||
let bb = dwmapi::DWM_BLURBEHIND {
|
||||
dwFlags: 0x1, // FIXME: DWM_BB_ENABLE;
|
||||
fEnable: 1,
|
||||
|
||||
Reference in New Issue
Block a user