Merge branch 'master' into update-winit

This commit is contained in:
Héctor Ramón Jiménez 2024-01-16 12:02:42 +01:00
commit 534c7dd7b0
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
93 changed files with 1642 additions and 970 deletions

View file

@ -915,11 +915,25 @@ fn run_command<A, C, E>(
.expect("Send message to event loop");
}
}
window::Action::FetchMaximized(id, callback) => {
if let Some(window) = window_manager.get_mut(id) {
proxy
.send_event(callback(window.raw.is_maximized()))
.expect("Send message to event loop");
}
}
window::Action::Maximize(id, maximized) => {
if let Some(window) = window_manager.get_mut(id) {
window.raw.set_maximized(maximized);
}
}
window::Action::FetchMinimized(id, callback) => {
if let Some(window) = window_manager.get_mut(id) {
proxy
.send_event(callback(window.raw.is_minimized()))
.expect("Send message to event loop");
}
}
window::Action::Minimize(id, minimized) => {
if let Some(window) = window_manager.get_mut(id) {
window.raw.set_minimized(minimized);