Skip to content

Commit

Permalink
On macOS, revert nextResponder calls (#628)
Browse files Browse the repository at this point in the history
* On macOS, revert nextResponder calls

* Update revert-responder.md
  • Loading branch information
wusyong committed Nov 21, 2022
1 parent 4e4570f commit a59b69b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
6 changes: 6 additions & 0 deletions .changes/revert-responder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tao": patch
---

Revert `nextResponder` call because this will bring key beep sound regression. We'll call the key equivalent in wry instead.

12 changes: 0 additions & 12 deletions src/platform_impl/macos/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -611,13 +611,6 @@ extern "C" fn do_command_by_selector(this: &Object, _sel: Sel, command: Sel) {
// AppState::queue_events(events);
// }

unsafe {
let responder: id = msg_send![this, nextResponder];
if !responder.is_null() {
let () = msg_send![responder, doCommandBySelector: command];
}
}

trace!("Completed `doCommandBySelector`");
}

Expand Down Expand Up @@ -747,11 +740,6 @@ extern "C" fn key_down(this: &mut Object, _sel: Sel, event: id) {
},
};
AppState::queue_event(EventWrapper::StaticEvent(window_event));

let responder: id = msg_send![this, nextResponder];
if !responder.is_null() {
let () = msg_send![responder, keyDown: event];
}
}
trace!("Completed `keyDown`");
}
Expand Down

0 comments on commit a59b69b

Please sign in to comment.