Skip to content

Commit

Permalink
Revert "fix(macos): global keys shortcuts (#1156)"
Browse files Browse the repository at this point in the history
This reverts commit c033bd2.
  • Loading branch information
pewsheen authored Feb 8, 2024
1 parent 8f92a35 commit c10e782
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/wkwebview/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,6 @@ impl InnerWebView {
sel!(acceptsFirstMouse:),
accept_first_mouse as extern "C" fn(&Object, Sel, id) -> BOOL,
);
decl.add_method(
sel!(performKeyEquivalent:),
key_equivalent as extern "C" fn(&mut Object, Sel, id) -> BOOL,
);

extern "C" fn accept_first_mouse(this: &Object, _sel: Sel, _event: id) -> BOOL {
unsafe {
Expand All @@ -357,17 +353,7 @@ impl InnerWebView {
}
}
}

extern "C" fn key_equivalent(_this: &mut Object, _sel: Sel, event: id) -> BOOL {
unsafe {
let app = cocoa::appkit::NSApp();
let menu: id = msg_send![app, mainMenu];
let () = msg_send![menu, performKeyEquivalent: event];
}
YES
}
}

decl.register()
}
_ => class!(WryWebView),
Expand Down

0 comments on commit c10e782

Please sign in to comment.