mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-03 07:10:05 -04:00
Merge pull request #111 from jrmuizel/awakened
macos: Map our user generated event to Event::Awakened
This commit is contained in:
@@ -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 },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user