From 71acd7d2a9bfd81bca42e151ce0b24003fa1af3d Mon Sep 17 00:00:00 2001 From: Jeremy Fitzhardinge Date: Sat, 28 Dec 2019 23:11:17 -0800 Subject: [PATCH] Add focus tracking for Wayland --- window/src/os/wayland/window.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/window/src/os/wayland/window.rs b/window/src/os/wayland/window.rs index f36f78717..344e13300 100644 --- a/window/src/os/wayland/window.rs +++ b/window/src/os/wayland/window.rs @@ -302,7 +302,8 @@ impl WaylandWindowInner { .key_event(&key_event, &Window::Wayland(WaylandWindow(self.window_id))); } KeyboardEvent::Modifiers { modifiers } => self.modifiers = modifiers, - KeyboardEvent::Enter { .. } | KeyboardEvent::Leave { .. } => {} + KeyboardEvent::Enter { .. } => self.callbacks.focus_change(true), + KeyboardEvent::Leave { .. } => self.callbacks.focus_change(false), } }