mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-01-01 18:40:10 +01:00
eis: only queue a seat bind event if the caps change
This triggered an internal bug message in test_ei_seat_bind_unbind_immediately. If a client unbinds all capabilities this triggers an EIS_SEAT_BIND with zero caps. peck would call eis_seat_remove() which calls eis_seat_drop(). That queued another EIS_EVENT_SEAT_BIND with zero capabilities, leading peck to call eis_seat_remove() again on an already removed seat.
This commit is contained in:
parent
44e7f2cbc4
commit
d31b5a1ccf
2 changed files with 7 additions and 2 deletions
|
|
@ -241,9 +241,12 @@ eis_seat_bind(struct eis_seat *seat, uint32_t caps)
|
|||
}
|
||||
|
||||
caps &= seat->capabilities.c_mask;
|
||||
|
||||
seat->state = EIS_SEAT_STATE_BOUND;
|
||||
eis_queue_seat_bind_event(seat, caps);
|
||||
|
||||
uint32_t old_caps = seat->capabilities.bound;
|
||||
seat->capabilities.bound = caps;
|
||||
if (old_caps != caps)
|
||||
eis_queue_seat_bind_event(seat, caps);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ struct eis_seat {
|
|||
struct {
|
||||
uint32_t c_mask; /* this is the C API bitmask */
|
||||
uint64_t proto_mask; /* the protocol mask */
|
||||
|
||||
uint32_t bound; /* C API bitmask */
|
||||
} capabilities;
|
||||
|
||||
struct list devices;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue