]> git.xonotic.org Git - xonotic/darkplaces.git/commit
input: stop capturing mouse movement if window is hidden without first losing focus
authorbones_was_here <bones_was_here@xonotic.au>
Thu, 5 Oct 2023 18:44:37 +0000 (04:44 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Wed, 8 Nov 2023 17:26:26 +0000 (03:26 +1000)
commit777e442595347a668d06d54d9f9c784e83bf6a21
treefe2f0f8ce345e3c348121482f0efe4470ef90b87
parent838b57bb5d2085dbd5af5ff4b886edb909f5027a
input: stop capturing mouse movement if window is hidden without first losing focus

Fixes players looking all around after they alt+tabbed.

Moves the logic for selecting the mouse mode out of screen drawing and
into SDL event handling where it's unaffected if we early-out of drawing
the frame.

Prevents mouse "grab" (raw/relative mode + cursor hiding) in a few
"loading" situations.

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
cl_screen.c
vid.h
vid_null.c
vid_sdl.c