From 6933401b729027d42cf9077c4fea35a3c452e93f Mon Sep 17 00:00:00 2001 From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Thu, 7 May 2020 22:29:24 +0200 Subject: [PATCH] temporary workaround for mouse input bug with sdl on linux --- vid_sdl.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vid_sdl.c b/vid_sdl.c index bad18352..9d37cc14 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -1189,6 +1189,9 @@ void Sys_SendKeyEvents( void ) break; } + if (!vid_activewindow) + VID_SetMouse(false, false, false); + // enable/disable sound on focus gain/loss if ((!vid_hidden && vid_activewindow) || !snd_mutewhenidle.integer) { @@ -1446,6 +1449,9 @@ void Sys_SendKeyEvents( void ) break; } + if (!vid_activewindow) + VID_SetMouse(false, false, false); + // enable/disable sound on focus gain/loss if ((!vid_hidden && vid_activewindow) || !snd_mutewhenidle.integer) { @@ -2894,6 +2900,9 @@ void VID_Finish (void) #endif vid_activewindow = !vid_hidden && vid_hasfocus; + if (!vid_activewindow) + VID_SetMouse(false, false, false); + VID_UpdateGamma(); if (!vid_hidden) -- 2.39.2