mirror of
https://github.com/tauri-apps/winit.git
synced 2026-02-04 02:11:19 +01:00
Fix MenuHandler for windows
This commit is contained in:
@@ -38,9 +38,7 @@ pub struct MenuHandler {
|
||||
impl MenuHandler {
|
||||
pub fn new(window: HWND, send_event: Box<dyn Fn(Event<'static, ()>)>) -> MenuHandler {
|
||||
let data = Box::new(MenuHandlerData { window, send_event });
|
||||
MenuHandler {
|
||||
data: Box::into_raw(data),
|
||||
}
|
||||
MenuHandler { window, send_event }
|
||||
}
|
||||
fn send_event(&self, event: Event<'static, ()>) {
|
||||
(self.send_event)(event);
|
||||
|
||||
Reference in New Issue
Block a user