-
Notifications
You must be signed in to change notification settings - Fork 109
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
Distinguish between touch and non-touch pointer events #1608
Conversation
As written wouldn't the slot 0 is_finger state simply swap between true and false a bit? |
That one only changes on a |
@@ -423,7 +424,7 @@ function S.waitForEvent(sec, usec) | |||
end | |||
local x = is_finger and event.tfinger.x * S.w or event.button.x | |||
local y = is_finger and event.tfinger.y * S.h or event.button.y | |||
setPointerDownState(slot, true) | |||
setPointerDownState(slot, true, is_finger) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right, in the specific sway bug scenario this one will only trigger once. But in that case this would need a lot of comments to explain what it's doing since this won't solve the generic scenario that a naive reader would expect to be solved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, more comments would be good; because that MOUSEMOTION event in the middle of the sandwich is hella weird ;o).
(I wouldn't mind a link to koreader/koreader#10417 (comment) in said comment, as this clearly showcases the issue).
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NiLuJe Workaround fine by you?
Yeah, that looks sensible to me ;). |
This PR should become unnecessary once swaywm/sway#7583 gets accepted. |
Alright, let's wait and see a bit. |
swaywm/sway#7583 has been merged, rendering this PR unnecessary. |
Fixes koreader/koreader#10417.
This change is