mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 13:31:29 +11:00
Android: Do not mark unhandled events as handled. (#1820)
This commit is contained in:
parent
9d63fc7ca0
commit
d1a7749df5
|
@ -4,6 +4,7 @@
|
|||
- On Windows, change the default window size (1024x768) to match the default on other desktop platforms (800x600).
|
||||
- On Windows, fix bug causing mouse capture to not be released.
|
||||
- On Windows, fix fullscreen not preserving minimized/maximized state.
|
||||
- On Android, unimplemented events are marked as unhandled on the native event loop.
|
||||
|
||||
# 0.24.0 (2020-12-09)
|
||||
|
||||
|
|
|
@ -176,6 +176,7 @@ impl<T: 'static> EventLoop<T> {
|
|||
if let Some(input_queue) = ndk_glue::input_queue().as_ref() {
|
||||
while let Some(event) = input_queue.get_event() {
|
||||
if let Some(event) = input_queue.pre_dispatch(event) {
|
||||
let mut handled = true;
|
||||
let window_id = window::WindowId(WindowId);
|
||||
let device_id = event::DeviceId(DeviceId);
|
||||
match &event {
|
||||
|
@ -191,7 +192,10 @@ impl<T: 'static> EventLoop<T> {
|
|||
MotionAction::Cancel => {
|
||||
Some(event::TouchPhase::Cancelled)
|
||||
}
|
||||
_ => None, // TODO mouse events
|
||||
_ => {
|
||||
handled = false;
|
||||
None // TODO mouse events
|
||||
}
|
||||
};
|
||||
if let Some(phase) = phase {
|
||||
let pointers: Box<
|
||||
|
@ -235,9 +239,12 @@ impl<T: 'static> EventLoop<T> {
|
|||
}
|
||||
}
|
||||
}
|
||||
InputEvent::KeyEvent(_) => {} // TODO
|
||||
InputEvent::KeyEvent(_) => {
|
||||
// TODO
|
||||
handled = false;
|
||||
}
|
||||
};
|
||||
input_queue.finish_event(event, true);
|
||||
input_queue.finish_event(event, handled);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue