Implement SetMode and FetchMode window actions

This commit is contained in:
Héctor Ramón Jiménez 2022-08-18 14:39:15 +02:00
parent 277b848ad8
commit 11f5527d76
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
7 changed files with 123 additions and 5 deletions

View file

@ -640,6 +640,20 @@ pub fn run_command<A, E>(
y,
});
}
window::Action::SetMode(mode) => {
window.set_visible(conversion::visible(mode));
window.set_fullscreen(conversion::fullscreen(
window.primary_monitor(),
mode,
));
}
window::Action::FetchMode(tag) => {
let mode = conversion::mode(window.fullscreen());
proxy
.send_event(tag(mode))
.expect("Send message to event loop");
}
},
command::Action::System(action) => match action {
system::Action::QueryInformation(_tag) => {