diff --git a/.changes/fix-focus-blur-events-wry.md b/.changes/fix-focus-blur-events-wry.md new file mode 100644 index 000000000..a853b593c --- /dev/null +++ b/.changes/fix-focus-blur-events-wry.md @@ -0,0 +1,6 @@ +--- +"tauri-runtime-wry": patch +"tauri": patch +--- + +Fixes `WindowEvent::Focus` and `WindowEvent::Blur` events not firing. diff --git a/.changes/fix-focus-blur-events.md b/.changes/fix-focus-blur-events.md new file mode 100644 index 000000000..1d14f5c96 --- /dev/null +++ b/.changes/fix-focus-blur-events.md @@ -0,0 +1,5 @@ +--- +"tauri": patch +--- + +Fixes `tauri://focus` and `tauri://blur` events not firing. diff --git a/core/tauri-runtime-wry/src/lib.rs b/core/tauri-runtime-wry/src/lib.rs index ebece72ce..8ad80e036 100644 --- a/core/tauri-runtime-wry/src/lib.rs +++ b/core/tauri-runtime-wry/src/lib.rs @@ -516,6 +516,8 @@ impl<'a> From<&WryWindowEvent<'a>> for WindowEventWrapper { scale_factor: *scale_factor, new_inner_size: PhysicalSizeWrapper(**new_inner_size).into(), }, + #[cfg(any(target_os = "linux", target_os = "macos"))] + WryWindowEvent::Focused(focused) => WindowEvent::Focused(*focused), _ => return Self(None), }; Self(Some(event))