Request for testing on PR for Linux users and mouse buttons

Here, developers communicate stuff that does not go onto the main News section or the front page of the site.
[Dev Blog] [Development Builds] [Git Change Log] [GZDoom Github Repo]

Moderator: GZDoom Developers

User avatar
mjr4077au
Posts: 720
Joined: Sun Jun 16, 2019 9:17 pm
Discord: mjr4077au#1027
Github ID: mjr4077au
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia

Request for testing on PR for Linux users and mouse buttons

Post by mjr4077au »

While working on Raze, I've noticed the SDL interface under Linux can sometimes appear to miss mouse clicks. I looked into this and SDL is properly sending through the events, but sometimes the click down and click up can both be read before the game has processed the click down, meaning nothing happens.

I've submitted PR #1509 to note down that if any keys go down during the processing of events and if there is a key up event for the same key in the same cycle, delay it until the next cycle. This effectively ensures all mouse clicks and key events get processed no matter what.

I've tested this and it works great but I'm only one Linux user, we'd love some further testing and I've presented it to GZDoom as it's got the larger audience. Other benefits this could have for all platforms are that it would make fast spinning of the mouse wheel a lot more reliable to ensuring all the event gets properly processed.

Thanks,
Mitch.
User avatar
mjr4077au
Posts: 720
Joined: Sun Jun 16, 2019 9:17 pm
Discord: mjr4077au#1027
Github ID: mjr4077au
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia

Re: Request for testing on PR for Linux users and mouse butt

Post by mjr4077au »

A quick video demonstrating the issue before the PR is applied, and with the PR applied about half-way through. I'm clicking in a way to highlight the issue but I do get missed clicks on normal gameplay.

Excuse the messy desk!

Last edited by mjr4077au on Wed Nov 17, 2021 7:13 pm, edited 1 time in total.
User avatar
Caligari87
User Accounts Assistant
Posts: 5997
Joined: Thu Feb 26, 2004 3:02 pm
Discord: Caligari87#3089
Github ID: caligari87
Preferred Pronouns: He/Him

Re: Request for testing on PR for Linux users and mouse butt

Post by Caligari87 »

I know we discussed in the discord, but I can confirm the PR fixes the issue I didn't know I had until seeing this thread.

8-)
User avatar
Rachael
Admin
Posts: 12950
Joined: Tue Jan 13, 2004 1:31 pm
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Preferred Pronouns: She/Her

Re: Request for testing on PR for Linux users and mouse butt

Post by Rachael »

For those on Linux, timescaling down using i_timescale 0.1 might indeed help with testing this PR.
User avatar
Rachael
Admin
Posts: 12950
Joined: Tue Jan 13, 2004 1:31 pm
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Preferred Pronouns: She/Her

Re: Request for testing on PR for Linux users and mouse butt

Post by Rachael »

I think mjr's PR is safe to merge. There is another that should be tested/evaluated though - https://github.com/coelckers/gzdoom/pull/1510 - also affects Linux.

This was a change that was requested - apparently on some distros, SDL defaults to minimizing when you alt-tab away. That is, needless to say, not very desirable unless in fullscreen and you want to actually see the desktop. Apparently this behavior is also inconsistent across distros - some distros have SDL default to minimizing on focus loss, some distros have SDL default to not minimizing.
User avatar
Rachael
Admin
Posts: 12950
Joined: Tue Jan 13, 2004 1:31 pm
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Preferred Pronouns: She/Her

Re: Request for testing on PR for Linux users and mouse butt

Post by Rachael »

After trying the PR myself, yes it does seem to work, and the mouse button input does seem to be much better.
User avatar
mjr4077au
Posts: 720
Joined: Sun Jun 16, 2019 9:17 pm
Discord: mjr4077au#1027
Github ID: mjr4077au
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia

Re: Request for testing on PR for Linux users and mouse butt

Post by mjr4077au »

Thanks, I appreciate all the testing so far and I'm glad its made genuine, noticeable improvements and its not just me :)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48034
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Request for testing on PR for Linux users and mouse butt

Post by Graf Zahl »

Then let's merge it.

Return to “Developer Blog”