From e400f972c1fe6fa4f70f8cfe559ded680e6cf740 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 4 Jun 2024 23:20:33 +0200 Subject: Introduce `window::Id` to `Event` subscriptions And remove `window::Id` from `Event` altogether. --- futures/src/keyboard.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'futures/src/keyboard.rs') diff --git a/futures/src/keyboard.rs b/futures/src/keyboard.rs index 8e7da38f..43ed7742 100644 --- a/futures/src/keyboard.rs +++ b/futures/src/keyboard.rs @@ -18,7 +18,7 @@ where #[derive(Hash)] struct OnKeyPress; - subscription::filter_map((OnKeyPress, f), move |event, status| { + subscription::filter_map((OnKeyPress, f), move |event, status, _window| { match (event, status) { ( core::Event::Keyboard(Event::KeyPressed { @@ -45,8 +45,9 @@ where #[derive(Hash)] struct OnKeyRelease; - subscription::filter_map((OnKeyRelease, f), move |event, status| { - match (event, status) { + subscription::filter_map( + (OnKeyRelease, f), + move |event, status, _window| match (event, status) { ( core::Event::Keyboard(Event::KeyReleased { key, @@ -56,6 +57,6 @@ where core::event::Status::Ignored, ) => f(key, modifiers), _ => None, - } - }) + }, + ) } -- cgit