mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-23 22:01:31 +11:00
Retain WS_MAXIMZE
when unminmizing a maximized window (#2581)
Co-authored-by: Markus Siglreithmaier <m.siglreith@gmail.com>
This commit is contained in:
parent
9f781bc422
commit
89eea64a4a
|
@ -8,6 +8,7 @@ And please only add new entries to the top of this list, right below the `# Unre
|
|||
|
||||
# Unreleased
|
||||
|
||||
- On Windows, retain `WS_MAXIMIZE` window style when un-minimizing a maximized window.
|
||||
- On Windows, fix left mouse button release event not being sent after `Window::drag_window`.
|
||||
- On macOS, run most actions on the main thread, which is strictly more correct, but might make multithreaded applications block slightly more.
|
||||
- On macOS, fix panic when getting current monitor without any monitor attached.
|
||||
|
|
|
@ -51,6 +51,7 @@ fn main() {
|
|||
if minimized {
|
||||
minimized = !minimized;
|
||||
window.set_minimized(minimized);
|
||||
window.focus_window();
|
||||
}
|
||||
}
|
||||
VirtualKeyCode::V => {
|
||||
|
|
|
@ -1185,7 +1185,6 @@ unsafe fn public_window_callback_inner<T: 'static>(
|
|||
w.set_window_flags_in_place(|f| f.set(WindowFlags::MAXIMIZED, maximized));
|
||||
}
|
||||
}
|
||||
|
||||
userdata.send_event(event);
|
||||
0
|
||||
}
|
||||
|
|
|
@ -299,7 +299,7 @@ impl WindowFlags {
|
|||
self = self.mask();
|
||||
new = new.mask();
|
||||
|
||||
let diff = self ^ new;
|
||||
let mut diff = self ^ new;
|
||||
|
||||
if diff == WindowFlags::empty() {
|
||||
return;
|
||||
|
@ -357,6 +357,8 @@ impl WindowFlags {
|
|||
},
|
||||
);
|
||||
}
|
||||
|
||||
diff.remove(WindowFlags::MINIMIZED);
|
||||
}
|
||||
|
||||
if diff.contains(WindowFlags::CLOSABLE) || new.contains(WindowFlags::CLOSABLE) {
|
||||
|
|
Loading…
Reference in a new issue