Skip to content
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

wlcs::Client: Handle incomplete logical pointer/touch events better. #313

Merged

Conversation

RAOF
Copy link
Contributor

@RAOF RAOF commented Nov 10, 2023

A sequence of wl_pointer/wl_touch events are combined into a logical event by the terminating frame event. When tests ask for the current touch/pointer position, or window under touch/pointer, always return the current state, even if there is an incomplete logical event (ie: some events have been received, but not a terminating frame event).

There's no guarantee that a compositor will emit a complete logical event in a single flush of the protocol socket, so there's no guarantee that we won't run test code after receiving (for example) a wl_pointer.enter event but before processing a wl_pointer.frame.

So it is incorrect to fail the test in such cases

A sequence of `wl_pointer`/`wl_touch` events are combined into a logical event by
the terminating `frame` event. When tests ask for the current touch/pointer position,
or window under touch/pointer, always return the current state, even if there is
an incomplete logical event (ie: some events have been received, but not a terminating
`frame` event).

There's no guarantee that a compositor will emit a complete logical event in a
single flush of the protocol socket, so there's no guarantee that we won't
run test code after receiving (for example) a `wl_pointer.enter` event but before
processing a `wl_pointer.frame`.

So it is incorrect to fail the test in such cases
@RAOF
Copy link
Contributor Author

RAOF commented Nov 10, 2023

See also: this exchange in #Mir

1 similar comment
@RAOF
Copy link
Contributor Author

RAOF commented Nov 10, 2023

See also: this exchange in #Mir

Copy link
Contributor

@AlanGriffiths AlanGriffiths left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm convinced

@AlanGriffiths AlanGriffiths added this pull request to the merge queue Nov 22, 2023
Merged via the queue into main with commit 06d324f Nov 22, 2023
10 checks passed
@AlanGriffiths AlanGriffiths deleted the dont-incorrectly-error-on-partial-pointer-events branch November 22, 2023 11:18
@Saviq Saviq mentioned this pull request Dec 14, 2023
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.

None yet

2 participants