Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions winit-win32/src/window_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,13 @@ 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::MARKER_DECORATIONS) {
// WS_CAPTION is equal to (WS_BORDER | WS_DLGFRAME)
// The former is intended for overlapped windows,
// the latter are for child windows.
style &= !(WS_CAPTION | WS_SIZEBOX);
style_ex &= !WS_EX_WINDOWEDGE;
}
if self.contains(WindowFlags::POPUP) {
style |= WS_POPUP;
Expand Down
1 change: 1 addition & 0 deletions winit/src/changelog/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,3 +264,4 @@ changelog entry.
- On Windows, `Window::theme` will return the correct theme after setting it through `Window::set_theme`.
- On Windows, `Window::set_theme` will change the title bar color immediately now.
- On Windows 11, prevent incorrect shifting when dragging window onto a monitor with different DPI.
- On Windows, `with_decoration(false)` works for overlapped (non child) windows.
Loading