]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
temporary workaround for mouse input bug with sdl on linux Juhu/sdl_linux_mousefix 74/head
authorJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Thu, 7 May 2020 20:29:24 +0000 (22:29 +0200)
committerJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Thu, 7 May 2020 20:29:24 +0000 (22:29 +0200)
vid_sdl.c

index bad183525e54b2491d2839e115512c58b45c35ee..9d37cc14a3ca39d7efee0da5395fa7b94891b604 100644 (file)
--- 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)