k4zmu2a / SpaceCadetPinball

Decompilation of 3D Pinball for Windows – Space Cadet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When menu is hidden, keybindings don't work until you press Esc or click on screen

mooreye opened this issue · comments

If you start the app with hidden menu, no keybindings work until you press Esc or click on the screen. The focus seems to be on the Menu item in the left upper corner, as pressing arrow keys will highlight it.

Issue occurred on flatpak.

This bug is caused by the hidden window that houses menu button.
This window steals focus when it is first drawn at game start.
My guess is that I introduced this bug with the last ImGui update.

I fixed it by replacing the window with a hidden menu bar.
The drawback: new menu bar accepts mouse inputs on its entire invisible length.
I might have to switch back to the hidden window approach if this ever becomes an issue.