fix: re-adding focus/blur events for linux and macos (fix #2485) (#2489)

* fix: re-adding focus/blur events for linux and macos, closes #2485

* add change files [skip ci]

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
This commit is contained in:
Elvinas Predkelis
2021-08-24 17:47:54 +03:00
committed by GitHub
parent 1f98853573
commit 3b33d67aa4
3 changed files with 13 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
---
"tauri-runtime-wry": patch
"tauri": patch
---
Fixes `WindowEvent::Focus` and `WindowEvent::Blur` events not firing.

View File

@@ -0,0 +1,5 @@
---
"tauri": patch
---
Fixes `tauri://focus` and `tauri://blur` events not firing.

View File

@@ -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))