On Windows, Remove WS_CAPTION, WS_BORDER and WS_EX_WINDOWEDGE styles for child windows (#3410)

This commit is contained in:
Amr Bashir 2024-01-20 14:07:03 +02:00 committed by GitHub
parent 572d7ee77c
commit 0cc19716f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View file

@ -279,6 +279,12 @@ impl WindowFlags {
}
if self.contains(WindowFlags::CHILD) {
style |= WS_CHILD; // This is incompatible with WS_POPUP if that gets added eventually.
// Remove decorations window styles for child
if !self.contains(WindowFlags::MARKER_DECORATIONS) {
style &= !(WS_CAPTION | WS_BORDER);
style_ex &= !WS_EX_WINDOWEDGE;
}
}
if self.contains(WindowFlags::POPUP) {
style |= WS_POPUP;