mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 07:03:15 -04: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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user