Introduce window::Id to Event subscriptions

And remove `window::Id` from `Event` altogether.
This commit is contained in:
Héctor Ramón Jiménez 2024-06-04 23:20:33 +02:00
parent 49affc44ff
commit e400f972c1
No known key found for this signature in database
GPG key ID: 4C07CEC81AFA161F
19 changed files with 95 additions and 91 deletions

View file

@ -37,9 +37,8 @@ impl Events {
Command::none()
}
Message::EventOccurred(event) => {
if let Event::Window(id, window::Event::CloseRequested) = event
{
window::close(id)
if let Event::Window(window::Event::CloseRequested) = event {
window::close(window::Id::MAIN)
} else {
Command::none()
}