Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@creichen
Copy link
Owner

@creichen creichen commented Nov 26, 2023

xinput2_device_is_pen() was testing against default-zero values in the X11 Atom cache on at least the first round of detections, leading to imprecise detection.

Description

The patch fixes two aspects of initialisation:

  1. Ensure that the selector cache is always initialised in xinput2_device_is_pen().

  2. Ensure that all X11 Atoms used in SDL_x11pen.c are instantiated if missing. This ensures that they are never None and avoids potential failures to detect hot-plugged tablet devices.

Existing Issue(s)

May fix libsdl-org#8611

xinput2_device_is_pen() was testing against default-zero values
in the X11 Atom cache on at least the first round of
detections, leading to imprecise detection.

The patch fixes two aspects of initialisation:

1. Ensure that the selector cache is always initialised in
xinput2_device_is_pen().

2. Ensure that all X11 Atoms used in SDL_x11pen.c are instantiated if
missing. This ensures that they are never None and avoids potential
failures to detect hot-plugged tablet devices.

Acknowledgements: @tilman3 for narrowing down the issue and an
initial fix
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.

Mouse clicks not reported because mouse is misdetected as a pen

2 participants