diff --git a/src/macos/view.rs b/src/macos/view.rs index 3d5ffc5..e8a8829 100644 --- a/src/macos/view.rs +++ b/src/macos/view.rs @@ -249,14 +249,14 @@ extern "C" fn become_first_responder(this: &Object, _sel: Sel) -> BOOL { is_key_window == YES }; if is_key_window { - state.defer_event(Event::Window(WindowEvent::Focused)); + state.trigger_deferrable_event(Event::Window(WindowEvent::Focused)); } YES } extern "C" fn resign_first_responder(this: &Object, _sel: Sel) -> BOOL { let state = unsafe { WindowState::from_view(this) }; - state.defer_event(Event::Window(WindowEvent::Unfocused)); + state.trigger_deferrable_event(Event::Window(WindowEvent::Unfocused)); YES } diff --git a/src/macos/window.rs b/src/macos/window.rs index ab3576c..02d7522 100644 --- a/src/macos/window.rs +++ b/src/macos/window.rs @@ -392,7 +392,7 @@ impl WindowState { status } - pub(super) fn defer_event(&self, event: Event) { + pub(super) fn trigger_deferrable_event(&self, event: Event) { if let Ok(mut window_handler) = self.window_handler.try_borrow_mut() { let mut window = crate::Window::new(Window { inner: &self.window_inner }); window_handler.on_event(&mut window, event);