-
Notifications
You must be signed in to change notification settings - Fork 920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Macos fires WindowEvent::Focused(false)
on WinitWindow
creation
#2695
Comments
cc: @amrbashir @kchibisov |
So do you have |
Yes! When i print the output of |
The synthetic focused event was queued after the real event was send leading to focused issues on startup. Fixes rust-windowing#2695.
The synthetic focused event was queued after the real event was send leading to focused issues on startup. Fixes rust-windowing#2695.
@TimonPost could you verify whether my patch changes anything for you? Because I can't repro the original issue you're having in the first place to begin with. |
The synthetic focused event was queued after the real event was send leading to focused issues on startup. Fixes rust-windowing#2695.
Will give it a try soon. Yes I found it hard to replicate the same behavior in an standalone app. We do have quite some complex setup of our window logic so many moving parts. |
Yeah, that would be nice, since my testing target is usually alacritty, and it works fine with the current logic we have. |
The synthetic focused event was queued after the real event was send leading to focused issues on startup. Fixes #2695.
I will still confirm the changes just need to get to work where I have a MacBook. |
Well, it was already confirmed, but yeah, sure. |
The synthetic focused event was queued after the real event was send leading to focused issues on startup. Fixes rust-windowing#2695.
The synthetic focused event was queued after the real event was send leading to focused issues on startup. Fixes #2695.
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_key
and thenFocused(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:
Sending an event on window creation creates unexpected behavior. Evenwhile my window is focused winit just informed me it isn't.
The text was updated successfully, but these errors were encountered: