Merge pull request #111 from jrmuizel/awakened

macos: Map our user generated event to Event::Awakened
This commit is contained in:
tomaka
2017-01-19 20:29:49 +01:00
committed by GitHub

View File

@@ -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 },
}
}