Skip to content

Commit

Permalink
move event-capture to App
Browse files Browse the repository at this point in the history
  • Loading branch information
samizdatco committed Dec 26, 2024
1 parent 1fac0ce commit dae1472
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/gui/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ impl App{
{
move |event, event_loop| match event {
Event::WindowEvent { event:ref win_event, window_id } => {
self.windows.capture_ui_event(&window_id, win_event);
self.windows.find(&window_id, |win| win.sieve.capture(win_event) );

match win_event {
WindowEvent::Destroyed | WindowEvent::CloseRequested => {
Expand Down
4 changes: 0 additions & 4 deletions src/gui/window_mgr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ impl WindowManager {
self.windows.iter_mut().find(|win| win.id() == *id).map(f);
}

pub fn capture_ui_event(&mut self, id:&WindowId, event:&WindowEvent){
self.find(id, |win| win.sieve.capture(event) )
}

pub fn has_ui_changes(&self) -> bool {
self.windows.iter().any(|win| !win.sieve.is_empty() )
}
Expand Down

0 comments on commit dae1472

Please sign in to comment.