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

seat: keep track of what buttons are pressed #1077

Open
@acrisci

Description

@acrisci

The seat pointer interface seems to be very prickly about how every button press must be followed by a button release in exactly that order.

For instance, if I just send a random wlr_seat_notify_pointer_button() with release, the pointer_state.button_count will now be wrong for the rest of the time that the compositor runs (with no buttons pressed, the value will be -1) because it simply decrements the button count whenever it gets a release.

I'm running into this now on #1018. Here, I don't want to send a button press when the compositor move starts. When the compositor move ends, it would be harmless to send a release for a button that was never pressed. However how it is now, that will completely screw up the seat state in a way that's difficult to debug and requires a compositor restart to fix.

The case of press without a release I would consider a developer error and we can't help that one. However, if the same button were notified to be pressed 5 times without releases, the count would still show one button pressed (not 5), which is correct.


wlroots has migrated to gitlab.freedesktop.org. This issue has been moved to:

https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/1077

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions