mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-23 22:01:31 +11:00
On Wayland send Focused(false) for new window
On Wayland winit will always get an explicit focused event from the system and will transfer it downstream. So send focused false to enforce it.
This commit is contained in:
parent
a06bb3f992
commit
78f1d1df38
|
@ -254,6 +254,12 @@ impl Window {
|
|||
|
||||
winit_state.window_map.insert(window_id, window_handle);
|
||||
|
||||
// On Wayland window doesn't have Focus by default and it'll get it later on. So be
|
||||
// explicit here.
|
||||
winit_state
|
||||
.event_sink
|
||||
.push_window_event(crate::event::WindowEvent::Focused(false), window_id);
|
||||
|
||||
winit_state
|
||||
.window_updates
|
||||
.insert(window_id, WindowUpdate::new());
|
||||
|
|
Loading…
Reference in a new issue