-
Notifications
You must be signed in to change notification settings - Fork 492
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
Toggling fullscreen stalls event updates (macOS) #1052
Comments
I think this issue is related to #1046. The suggested solution is to check if the window has been unfocused, but I'm not sure if toggling fullscreen actually unfocuses the window on mac or if something else is going on. |
I'll try to investigate soon-ish. When testing in the The resize event seems to be reliably fired though which could be used after a fullscreen toggle to discard your buffered input state (or just generally when a RESIZE event is received - thinking about it, it's probably a good idea to discard buffered input on the following events: RESIZED, ICONIFIED, RESTORED, FOCUSED, UNFOCUSED, SUSPENDED, RESUMED). I'll see if I can investigate a bit more soon-ish. My guess is that since the fullscreen toggling takes some time to animate that I'm not receiving any input events from macOS during that time until the resize is finished, and that input events are also not queued inside macOS (so they would be lost). sokol_app.h directly forwards KEYUP and KEYDOWN events from the macOS event callbacks:
...so any strange behaviour should already happen "up" in macOS. |
When I toggle fullscreen on a key_down event, the key_up event does not trigger unless I release the key after the window finishes resizing, which means that I need to press the key twice to toggle fullscreen. This probably means that during the resize event, no other events get triggered at all. Is this behavior intended or a bug? I found that if I resize the window on a key_up event, I am able to toggle fullscreen as normal, so it isn't a huge issue but other apps (such as VS Code) can resize on key_down.
The text was updated successfully, but these errors were encountered: