add focus event
This commit is contained in:
parent
0646280d67
commit
0b140488b4
@ -29,4 +29,7 @@ pub enum Event {
|
||||
/// There will be a single `FilesHoveredLeft` event triggered even if
|
||||
/// multiple files were hovered.
|
||||
FilesHoveredLeft,
|
||||
|
||||
/// A window was focused or not
|
||||
Focused(bool),
|
||||
}
|
||||
|
@ -121,6 +121,9 @@ pub fn window_event(
|
||||
WindowEvent::Touch(touch) => {
|
||||
Some(Event::Touch(touch_event(*touch, scale_factor)))
|
||||
}
|
||||
WindowEvent::Focused(focused) => {
|
||||
Some(Event::Window(window::Event::Focused(*focused)))
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user