-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
touch issues with sway nightly #10417
Comments
This is where SDL creates the pointer motion event when processing the pointer enter event: https://github.com/libsdl-org/SDL/blob/237348c772b4ff0e758ace83f471dbf8570535e2/src/video/wayland/SDL_waylandevents.c#L452 This one does obviously not belong to the touch input device. |
Either the comment or it being there at all is a mistake. |
… SDL2_0.lua Presumably fairly harmless except in wasted processing because for motion the two are identical or close to it regardless. Noticed in koreader/koreader#10417 (comment)
You managed to confuse me with "non-working (and therefore commented out)". ^_^ It works perfectly; I'd merely accidentally left it commented for whatever reason because the overall effect is indistinguishable for our purposes. It's just an extra event saying effectively the same thing. |
This description doesn't make much sense to me actually, because you're simply describing a completely normal click or tap. There will often be a few pixels of movement. |
In short, if you want to trigger an accidental swipe you have to give it a really enthusiastic try. An intentional tap rarely generates more than about 5-10 physical px of movement even at 300 DPI, and note the |
Let me try again: the |
This is what it looks like. The touch point has coordinates
|
Both the first touch and the pointer are assigned This should be fixable by extending said check and saving some information to distinguish between touch and pointer events. What do you think? |
There's nothing to fix. Or that's not true exactly, as I stated here a tester can easily trigger this scenario by using a mouse and a touchscreen simultaneously,[1] which could be avoided by using first come first serve, but the specific problem here is a bug in sway or SDL. That mouse movement should come after up, not before. [1] Though much more easily in the reverse manner by clicking with a pointing device and doing a tap somewhere with a finger to trigger a swipe. |
Anyway, I was planning to fix that actual issue eventually but you're welcome to submit a PR. ;-) |
Thanks -- I'll bring it up in my sway issue. I'm going to test the PR that I submitted just now. Thanks for looking into this! |
… SDL2_0.lua (#1607) Presumably fairly harmless except in wasted processing because for motion the two are identical or close to it regardless. Noticed in koreader/koreader#10417 (comment)
Fixed by swaywm/sway#7583. |
Issue
I've been using sway nightly as it features support for cancelling gestures. Before swaywm/sway@4666d17 touch events did not affect the pointer, which is consistent which e.g. plasma-wayland. Since swaywm/sway@4666d17 touch down events induce a cursor leave event if it was on the same surface, and the last touch up event induces a cursor enter event. See swaywm/sway#7577 for some sample wayland events.
When the cursor is on KOReader and a touch down and a touch up event are induced to initiate a tap, SDL also fires a
TOUCHMOTION
event, probably due to the cursor being restored. This results in not a tap gesture, but a pan gesture.I can provide some logs if you think this makes sense, but I think my description covers everything of relevance. I saw that koreader/koreader-base#1599 introduced a non-working (and therefore commented out) check https://github.com/koreader/koreader-base/blob/66b21534def34109c478759adb75364ac13694a4/ffi/SDL2_0.lua#L369
The check does not work because
event.motion.which == 0
(vs -1).I'm not sure yet if this is an issue with KOReader, SDL, or sway. I'm filing an issue here because I'm beginning to think that sway's behaviour is not unreasonable despite differing from e.g. plasma-wayland.
Steps to reproduce
The text was updated successfully, but these errors were encountered: