You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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 events-sapp sample, the focused/unfocused events don't seem to be fired reliably when going into and out of fullscreen via the window chrome buttons (which is a strange thing on its own).
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:
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: