Daemon icon indicating copy to clipboard operation
Daemon copied to clipboard

Engine not capturing mouse when going fullscreen and back

Open illwieckz opened this issue 1 year ago • 2 comments

In master going fullscreen doesn't capture the mouse pointer, one has to click (which may fire unwanted actions)

It was meant to be fixed by !856:

  • https://github.com/DaemonEngine/Daemon/pull/856

but we are currently running #922:

  • https://github.com/DaemonEngine/Daemon/pull/922

I don't know if it's a regression in that rewrite, or if it's a bug hidden somewhere else in our code, or a bug in libraries like SDL.

illwieckz avatar May 13 '24 04:05 illwieckz

We also not capture the mouse when leaving fullscreen.

illwieckz avatar May 13 '24 04:05 illwieckz

Reverting b434381ad5517d672a4e60b191ca773ada01719b (Simplify mouse mode handling) doesn't fix the mouse capture when toggling fullscreen.

I assume we have a kind of race condition: toggling fullscreen can be very slow, and the game is not (re)focused yet when we request the mouse pointer.

illwieckz avatar May 13 '24 05:05 illwieckz

Fixed by #1146?

slipher avatar May 15 '24 20:05 slipher

Yes

illwieckz avatar May 15 '24 20:05 illwieckz