mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 07:03:15 -04:00
Added WindowHasFocus and WindowLostFocus events to Android (#1733)
* Added WindowHasFocus and WindowLostFocus events to Android * Update changelog
This commit is contained in:
committed by
GitHub
parent
d18afb4a50
commit
676fb947f2
@@ -148,6 +148,28 @@ impl<T: 'static> EventLoop<T> {
|
||||
);
|
||||
}
|
||||
}
|
||||
Event::WindowHasFocus => {
|
||||
call_event_handler!(
|
||||
event_handler,
|
||||
self.window_target(),
|
||||
control_flow,
|
||||
event::Event::WindowEvent {
|
||||
window_id: window::WindowId(WindowId),
|
||||
event: event::WindowEvent::Focused(true),
|
||||
}
|
||||
);
|
||||
}
|
||||
Event::WindowLostFocus => {
|
||||
call_event_handler!(
|
||||
event_handler,
|
||||
self.window_target(),
|
||||
control_flow,
|
||||
event::Event::WindowEvent {
|
||||
window_id: window::WindowId(WindowId),
|
||||
event: event::WindowEvent::Focused(false),
|
||||
}
|
||||
);
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
Some(EventSource::InputQueue) => {
|
||||
|
||||
Reference in New Issue
Block a user