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

@ -1,5 +1,6 @@
//! Run commands and keep track of subscriptions.
use crate::core::event::{self, Event};
use crate::core::window;
use crate::subscription;
use crate::{BoxFuture, BoxStream, Executor, MaybeSend};
@ -127,7 +128,12 @@ where
/// See [`Tracker::broadcast`] to learn more.
///
/// [`Tracker::broadcast`]: subscription::Tracker::broadcast
pub fn broadcast(&mut self, event: Event, status: event::Status) {
self.subscriptions.broadcast(event, status);
pub fn broadcast(
&mut self,
event: Event,
status: event::Status,
window: window::Id,
) {
self.subscriptions.broadcast(event, status, window);
}
}