Skip to content

Commit 3b33d67

Browse files
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>
1 parent 1f98853 commit 3b33d67

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"tauri-runtime-wry": patch
3+
"tauri": patch
4+
---
5+
6+
Fixes `WindowEvent::Focus` and `WindowEvent::Blur` events not firing.

.changes/fix-focus-blur-events.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Fixes `tauri://focus` and `tauri://blur` events not firing.

core/tauri-runtime-wry/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,8 @@ impl<'a> From<&WryWindowEvent<'a>> for WindowEventWrapper {
516516
scale_factor: *scale_factor,
517517
new_inner_size: PhysicalSizeWrapper(**new_inner_size).into(),
518518
},
519+
#[cfg(any(target_os = "linux", target_os = "macos"))]
520+
WryWindowEvent::Focused(focused) => WindowEvent::Focused(*focused),
519521
_ => return Self(None),
520522
};
521523
Self(Some(event))

0 commit comments

Comments
 (0)