Implemented fetch_maximized and fetch_minimized
This commit is contained in:
parent
6c9dfbf01e
commit
2aa2b1712d
4 changed files with 69 additions and 0 deletions
|
|
@ -942,11 +942,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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue