We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b38581 commit 94f06cbCopy full SHA for 94f06cb
src/lib.rs
@@ -792,8 +792,19 @@ impl EventHandler for Stage {
792
}
793
794
fn window_minimized_event(&mut self) {
795
+ let context = get_context();
796
+
797
#[cfg(target_os = "android")]
- get_context().audio_context.pause();
798
+ context.audio_context.pause();
799
800
+ // Clear held down keys and button and announce them as released
801
+ context.mouse_released.extend(context.mouse_down.drain());
802
+ context.keys_released.extend(context.keys_down.drain());
803
804
+ // Announce all touches as released
805
+ for (_, touch) in context.touches.iter_mut() {
806
+ touch.phase = input::TouchPhase::Ended;
807
+ }
808
809
810
fn quit_requested_event(&mut self) {
0 commit comments