Skip to content

osc.lua: fix element touch handling #16468

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

na-na-hi
Copy link
Contributor

On some compositors, when all touch points disappear the compositors reset the mouse position, which moves the mouse out of the osc element trigger area so mouse up events do not happen.

Fix this by tracking the last touch position and use that as the virt mouse position if the screen is recently touched.

@kasper93
Copy link
Member

Do you think this shouldn't be fixed in input.c for consistent mouse up behavior for all scripts, not only in osc.lua?

@na-na-hi
Copy link
Contributor Author

Do you think this shouldn't be fixed in input.c for consistent mouse up behavior for all scripts, not only in osc.lua?

This would require that mouse movements being ignored during the timeout period after all touch points are removed, and clients cannot get any updates to the mouse-pos property during this period. After this period if I click the mouse without moving it, the clients will still see the old touch position and not the new mouse position.

In other words, because information loss in the process, clients are not able to handle this properly, unlike the current approach using up to date mouse + touch position data.

@kasper93
Copy link
Member

could you fix typo in commit title?

On some compositors, when all touch points disappear the compositors
reset the mouse position, which moves the mouse out of the osc element
trigger area so mouse up events do not happen.

Fix this by tracking the last touch position and use that as the virt
mouse position if the screen is recently touched.
@na-na-hi na-na-hi changed the title osc.lua: fix elememnt touch handling osc.lua: fix element touch handling Jun 28, 2025
Copy link

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.

2 participants