On Windows, improve support for undecorated windows (#2419)

This commit is contained in:
Markus Siglreithmaier 2022-08-15 02:36:37 +02:00 committed by GitHub
parent 2e4338bb8d
commit 76f158d310
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 274 additions and 205 deletions

View file

@ -36,6 +36,7 @@ pub struct PlatformSpecificWindowBuilderAttributes {
pub drag_and_drop: bool,
pub preferred_theme: Option<Theme>,
pub skip_taskbar: bool,
pub decoration_shadow: bool,
}
impl Default for PlatformSpecificWindowBuilderAttributes {
@ -48,6 +49,7 @@ impl Default for PlatformSpecificWindowBuilderAttributes {
drag_and_drop: true,
preferred_theme: None,
skip_taskbar: false,
decoration_shadow: false,
}
}
}
@ -106,6 +108,12 @@ impl From<WindowId> for u64 {
}
}
impl From<WindowId> for HWND {
fn from(window_id: WindowId) -> Self {
window_id.0
}
}
impl From<u64> for WindowId {
fn from(raw_id: u64) -> Self {
Self(raw_id as HWND)