-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
B - bugDang, that shouldn't have happenedDang, that shouldn't have happened
Description
Description
In winit
v0.30.12
, one of the first emitted events is WindowEvent::Focused(false)
, despite the window getting focus on start. Calling widow.has_focus()
yields the correct true
.
Switching away from the winit app (with cmd-tab) yields another WindowEvent::Focused(false)
.
Only when switching back to the winit app do we get the first WindowEvent::Focused(true)
.
Interestingly, this is NOT an issue on latest master
.
With winit 0.31 having no due-date, I think this would be nice to fix in 0.30.x.
Repro: cargo r --example window
macOS version
ProductName: macOS
ProductVersion: 26.0.1
BuildVersion: 25A362
Winit version
0.30.12
Related
I found this old pair of issue/PR:
- Macos fires
WindowEvent::Focused(false)
onWinitWindow
creation #2695 - On macOS, fix initial focused state #2696
Seems like we have a regression.
Workaround
Ignore the value of WindowEvent::Focused
and only trust window.has_focus()
Metadata
Metadata
Assignees
Labels
B - bugDang, that shouldn't have happenedDang, that shouldn't have happened