On Windows, allow the creation of popup window (#1895)

Add with_owner_window to WindowBuilderExtWindows.
Add set_enable to WindowExtWindows.
This commit is contained in:
Rodrigodd 2021-04-10 10:47:19 -03:00 committed by GitHub
parent 629cd86c7c
commit dabcb1834d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 80 additions and 11 deletions

View file

@ -68,6 +68,7 @@ bitflags! {
const TRANSPARENT = 1 << 6;
const CHILD = 1 << 7;
const MAXIMIZED = 1 << 8;
const POPUP = 1 << 14;
/// Marker flag for fullscreen. Should always match `WindowState::fullscreen`, but is
/// included here to make masking easier.
@ -213,6 +214,9 @@ impl WindowFlags {
if self.contains(WindowFlags::CHILD) {
style |= WS_CHILD; // This is incompatible with WS_POPUP if that gets added eventually.
}
if self.contains(WindowFlags::POPUP) {
style |= WS_POPUP;
}
if self.contains(WindowFlags::MINIMIZED) {
style |= WS_MINIMIZE;
}