Skip to content

Commit

Permalink
rename method: defer_event -> trigger_deferrable_event
Browse files Browse the repository at this point in the history
  • Loading branch information
httnn committed May 12, 2024
1 parent fc4bff8 commit 6018b44
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/macos/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion src/macos/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6018b44

Please sign in to comment.