Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

get_(pointer|keyboard|touch) does not correctly handle missing capabilities #2227

Closed
kennylevinsen opened this issue May 27, 2020 · 0 comments · Fixed by #2228
Closed

get_(pointer|keyboard|touch) does not correctly handle missing capabilities #2227

kennylevinsen opened this issue May 27, 2020 · 0 comments · Fixed by #2228

Comments

@kennylevinsen
Copy link
Member

get_(pointer|keyboard|touch) must succeed if a seat has ever had the relevant capability, but wlroots does nothing but log an error if the seat does not currently have the relevant capability.

If a new capability is lost in between a client being notified of its creation and the client creating the respective wl_(pointer|keyboard|touch) object, then a resource is never allocated server-side for the object, and the upcoming attempt to release the object will lead to a protocol error.

kennylevinsen added a commit to kennylevinsen/wlroots that referenced this issue May 27, 2020
We should throw a protocol error if the relevant capability has never
existed when get_(pointer|keyboard|touch) is called. Otherwise, it
should succeed, even if the capability is not currently present.

This follows the spec, and avoids possible races with the client when
capabilities are lost.

Closes: swaywm#2227
kennylevinsen added a commit to kennylevinsen/wlroots that referenced this issue May 27, 2020
We should throw a protocol error if the relevant capability has never
existed when get_(pointer|keyboard|touch) is called. Otherwise, it
should succeed, even if the capability is not currently present.

This follows the spec, and avoids possible races with the client when
capabilities are lost.

Closes: swaywm#2227
emersion pushed a commit that referenced this issue May 28, 2020
We should throw a protocol error if the relevant capability has never
existed when get_(pointer|keyboard|touch) is called. Otherwise, it
should succeed, even if the capability is not currently present.

This follows the spec, and avoids possible races with the client when
capabilities are lost.

Closes: #2227
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant