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
commit 9af1e0ed0f

View file

@ -822,6 +822,12 @@ unsafe fn NSEventToEvent(window: &Window, nsevent: id) -> Option<Event> {
appkit::NSEventTypePressure => { appkit::NSEventTypePressure => {
Some(Event::TouchpadPressure(nsevent.pressure(), nsevent.stage())) Some(Event::TouchpadPressure(nsevent.pressure(), nsevent.stage()))
}, },
appkit::NSApplicationDefined => {
match nsevent.subtype() {
appkit::NSEventSubtype::NSApplicationActivatedEventType => { Some(Event::Awakened) }
_ => { None }
}
},
_ => { None }, _ => { None },
} }
} }