summaryrefslogtreecommitdiffstats
path: root/winit
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--winit/src/conversion.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/winit/src/conversion.rs b/winit/src/conversion.rs
index f073c474..0e04b35d 100644
--- a/winit/src/conversion.rs
+++ b/winit/src/conversion.rs
@@ -109,6 +109,11 @@ pub fn window_event(
WindowEvent::ModifiersChanged(new_modifiers) => Some(Event::Keyboard(
keyboard::Event::ModifiersChanged(self::modifiers(*new_modifiers)),
)),
+ WindowEvent::Focused(focused) => Some(Event::Window(if *focused {
+ window::Event::Focused
+ } else {
+ window::Event::Unfocused
+ })),
WindowEvent::HoveredFile(path) => {
Some(Event::Window(window::Event::FileHovered(path.clone())))
}