jorisvddonk / system-reset

System Reset - Re-implementation of Noctis IV, in Godot
9 stars 1 forks source link

Alt tab issues #15

Open selb opened 8 months ago

selb commented 8 months ago

On Win11, if I alt-tab, I can no longer orient the camera with the mouse as expected. It is possible in this state to orient the camera by holding down a mouse button. Pressing Alt once after tabbing back in fixes it.

jorisvddonk commented 8 months ago

System Reset allows you to press a key to temporarily cancel the mouse capture, as I found it to be useful during debugging with debug widgets. By default this is bound to Alt ("cancel_mouse_capture" action in the input map). This is the reason why the fix works.

Changing the key binding to another key however reveals a new, slightly different problem; if you then focus back on the game window the mouse is captured but moving it won't work and you then still have to press whatever was bound to "cancel_mouse_capture".

A proper fix should entail responding to some kind of window focus event and then fixing the mouse capture.