Open madsmtm opened 2 months ago
As long as the values are the same as the user queried them at the point of create_window
it should be fine to not emit those, since the events imply that something default got changed, when it clearly not changed.
I have updated since you looked to also remove the redundant Focused(false)
event on macOS that I added myself in https://github.com/rust-windowing/winit/pull/2585#issuecomment-1396208659.
The focus stuff was required before since it wasn't stated whether the window is focused by default or not, so some assumed yeS, others not, so it was a bit messy.
I know that right now we explicitly declare that the window is not focused by default.
Ah, nice, thanks!
In Winit, we generally do not emit events for the initial value of things on the window. Existing examples include
ThemeChanged
,ModifiersChanged
,Moved
,CursorMoved
and so on. So let's not do that forScaleFactorChanged
,SurfaceResized
andFocused
either!See also https://github.com/rust-windowing/winit/pull/2696 and https://github.com/rust-windowing/winit/pull/2585 for some of the history on
Focused
. I don't know what I was thinking in https://github.com/rust-windowing/winit/pull/2585#issuecomment-1396208659, but it's clearly wrong, we don't need to emitFocused(false)
since it's the default for all platforms.Part of https://github.com/rust-windowing/winit/issues/2640.
changelog
module if knowledge of this change could be valuable to users