Closed mil closed 2 years ago
https://github.com/koreader/koreader/issues/9091 ^ found this issue in researching as well, may be related
Can you check that commit and see if that's the problem? It doesn't look like that would have the effect you're describing, offhand.
Hmm, so I tested reverting both: https://github.com/libsdl-org/SDL/commit/8f8b14cbb684603e71e5ee5ccf6e07f460efbb4c and https://github.com/libsdl-org/SDL/commit/96be9cddcc433f4ceeb7fa2c4df6b65196839b80 neither are the issue.
Not entirely sure on the root cause / where to investigate to determine cause of this issue. 2.0.20 is working as expected for me. Was there some rework to touch/motion events from 2.0.20 -> 2.0.22 that could be the cause.
Can you use git bisect to identify the breaking change?
Offending commit is: 5ff42438e36e98c9d72ac70f5f5ce4599b96d3d2
Setting export SDL_MOUSE_AUTO_CAPTURE=0
fixes things on 2.0.22 for me; maybe auto capture should be disabled by default
Why does auto capture affect touch events?
That commit caused way too many issues
Touch handling on X11 with auto capture enabled is broken in general, it's not just gestures or mouse emulation. SDL sends an FINGERUP event right after FINGERDOWN (sometimes there's a single FINGERMOTION in between in you move your finger fast), so the touches end as soon as they start.
@icculus, can you look into this?
For what it's worth, here is a reproduction case for the single touch mouse motion emulation (with SDL_MOUSE_TOUCHID
) that has some visualization: https://github.com/libsdl-org/SDL/issues/5924#issue-1306801715 Doesn't cover multi touch however.
Yeah, I'll take a look.
I can reproduce this here, I'm investigating.
Fixed, thanks!
As of upgrading to 2.0.22 on certain devices on X11, the emulation of motion events for touch devices is broken. Specifically I'm testing on the Pinephone on X11. What I've observed is that
SDL_MOUSEBUTTONUP
andSDL_MOUSEBUTTONDOWN
are properly reported, howeverSDL_MOUSEMOTION
events are not reported. Additionally gesture events (SDL_MULTIGESTURE
) are not reported. Downgrading to 2.0.20 fixes these issues andSDL_MULTIGESTURE
andSDL_MOUSEMOTION
are then properly reported.I've also noticed that setting the hint
SDL_TOUCH_MOUSE_EVENTS
to0
restores the functionality ofSDL_MULTIGESTURE
events (but doesn't effect motion events..).If I had to guess the root cause of this issue is: https://github.com/libsdl-org/SDL/commit/8f8b14cbb684603e71e5ee5ccf6e07f460efbb4c .. however I haven't tested beyond just downgrading to 2.0.20 and seeing things work.
I'm testing on X11/Alpine Linux edge (postmarketOS) on a Pinephone (aarch64). Two example applications packaged to test with are
mepo
andrue
which both use touch events (and you can observe differences in application functionality between 2.0.22 and 2.0.20).