Retain WS_MAXIMZE when unminmizing a maximized window (#2581)

Co-authored-by: Markus Siglreithmaier <m.siglreith@gmail.com>
This commit is contained in:
Amr Bashir 2022-12-09 20:33:11 +02:00 committed by GitHub
parent 9f781bc422
commit 89eea64a4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 2 deletions

View file

@ -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.

View file

@ -51,6 +51,7 @@ fn main() {
if minimized {
minimized = !minimized;
window.set_minimized(minimized);
window.focus_window();
}
}
VirtualKeyCode::V => {

View file

@ -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
}

View file

@ -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) {