mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-02-02 23:06:32 +11:00
Add mac implementation of wakeup_event_loop.
This commit is contained in:
parent
435c64f473
commit
2c150143d8
1 changed files with 17 additions and 1 deletions
|
@ -80,7 +80,23 @@ pub struct WindowProxy;
|
|||
|
||||
impl WindowProxy {
|
||||
pub fn wakeup_event_loop(&self) {
|
||||
// TODO
|
||||
unsafe {
|
||||
let pool = NSAutoreleasePool::new(nil);
|
||||
let event =
|
||||
NSEvent::otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2(
|
||||
nil,
|
||||
NSApplicationDefined,
|
||||
NSPoint::new(0.0, 0.0),
|
||||
0,
|
||||
0.0,
|
||||
0,
|
||||
ptr::null_mut(),
|
||||
0,
|
||||
0,
|
||||
0);
|
||||
NSApp().postEvent_atStart_(event, true);
|
||||
pool.drain();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue