Skip to content

Conversation

@Flamefire
Copy link
Member

Avoid reporting duplicate mouse move events in SDL2

When warping the mouse a new event will be recorded with the SDL2
backend which might lead to handling that event multiple times.

For the right-click scrolling this leads to a potential infinite loop of
zero-sized movements.

Added an option to change the smart cursor setting in the ingame option window to test it which requires a tooltip for the checkbox due to the limited width.

  • Added support for that
  • moved duplicated function used by that to Window class
  • support chaining for some options to use a build-like pattern

@Flamefire Flamefire changed the title Fix lacks in right-click scrolling for SDL2 Fix lags in right-click scrolling for SDL2 Aug 24, 2025
Required e.g. for the image contro.
When warping the mouse a new event will be recorded with the SDL2
backend which might lead to handling that event multiple times.
For the right-click scrolling this leads to a potential infinite loop of
zero-sized movements.

Fixes #1791
Remove the superflous extra method
@Flamefire Flamefire force-pushed the warp-fix branch 2 times, most recently from 0bce1f5 to 136f113 Compare August 25, 2025 12:19
@Flamefire Flamefire requested a review from Flow86 August 27, 2025 06:02
@Flow86 Flow86 enabled auto-merge (rebase) August 28, 2025 05:05
@Flow86 Flow86 disabled auto-merge August 28, 2025 05:05
@Flow86 Flow86 merged commit 3185f2f into master Aug 28, 2025
15 of 19 checks passed
@Flow86 Flow86 deleted the warp-fix branch August 28, 2025 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants