mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Merge pull request #111 from jrmuizel/awakened
macos: Map our user generated event to Event::Awakened
This commit is contained in:
commit
9af1e0ed0f
|
@ -822,6 +822,12 @@ unsafe fn NSEventToEvent(window: &Window, nsevent: id) -> Option<Event> {
|
|||
appkit::NSEventTypePressure => {
|
||||
Some(Event::TouchpadPressure(nsevent.pressure(), nsevent.stage()))
|
||||
},
|
||||
appkit::NSApplicationDefined => {
|
||||
match nsevent.subtype() {
|
||||
appkit::NSEventSubtype::NSApplicationActivatedEventType => { Some(Event::Awakened) }
|
||||
_ => { None }
|
||||
}
|
||||
},
|
||||
_ => { None },
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue