android: Forward suspended() and resumed() events and patch up platform-specific documentation (#3786)
Key them off of `onStop()` and `onStart()` which seems to match the other backends most closely. These [Android Activity lifecycle] events denote when the application is visible on-screen, and recommend that any heavy lifting for startup and shutdown happens here, as the application may be demoted to the background and later shut down entirely unless the user navigates back to it. [Android Activity lifecycle]: https://developer.android.com/guide/components/activities/activity-lifecycle
This commit is contained in:
parent
c23bed20b8
commit
7d77ccfad3
5 changed files with 79 additions and 61 deletions
|
|
@ -218,10 +218,10 @@ declare_class!(
|
|||
trace_scope!("windowDidResignKey:");
|
||||
// It happens rather often, e.g. when the user is Cmd+Tabbing, that the
|
||||
// NSWindowDelegate will receive a didResignKey event despite no event
|
||||
// being received when the modifiers are released. This is because
|
||||
// being received when the modifiers are released. This is because
|
||||
// flagsChanged events are received by the NSView instead of the
|
||||
// NSWindowDelegate, and as a result a tracked modifiers state can quite
|
||||
// easily fall out of synchrony with reality. This requires us to emit
|
||||
// easily fall out of synchrony with reality. This requires us to emit
|
||||
// a synthetic ModifiersChanged event when we lose focus.
|
||||
self.view().reset_modifiers();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue