In this commit: b457329#diff-4803bb2335a17d700335730b9f62828e001faa602b9b894dff572422c737b78aR480 the author fires the Focused(false) event on macos window creation. It seems to be inconsistent with the other platforms.
In my case on macos I receive first Focused(true) and then Focused(false) when creating a window. The Focused(true) is caused by window_did_become_key and then Focused(false) is caused by the window init function queuing it when it is created.
On other platforms it seems like the focused boolean is automatically set to false upon creation without firing an event. This seems to create divergent behavior on different platforms as macos has an additional event now.
For now my fix is the following:
WindowEvent::Focused(_focused) => {
self.focused = winit.has_focus();
}
Sending an event on window creation creates unexpected behavior. Evenwhile my window is focused winit just informed me it isn't.
In this commit: b457329#diff-4803bb2335a17d700335730b9f62828e001faa602b9b894dff572422c737b78aR480 the author fires the
Focused(false)event on macos window creation. It seems to be inconsistent with the other platforms.In my case on macos I receive first
Focused(true)and thenFocused(false)when creating a window. TheFocused(true)is caused bywindow_did_become_keyand thenFocused(false)is caused by the window init function queuing it when it is created.On other platforms it seems like the
focusedboolean is automatically set to false upon creation without firing an event. This seems to create divergent behavior on different platforms as macos has an additional event now.For now my fix is the following:
Sending an event on window creation creates unexpected behavior. Evenwhile my window is focused winit just informed me it isn't.