mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-05-05 18:18:20 +02:00
ei: de-duplicate ei_seat_unbind_capability
ei_seat_unbind_capabilities does the same, so let's use that.
This commit is contained in:
parent
cf74cfeb1e
commit
9c5c3c890f
1 changed files with 1 additions and 22 deletions
|
|
@ -297,28 +297,7 @@ _public_ void
|
|||
ei_seat_unbind_capability(struct ei_seat *seat,
|
||||
enum ei_device_capability cap)
|
||||
{
|
||||
switch (seat->state) {
|
||||
case EI_SEAT_STATE_DONE:
|
||||
break;
|
||||
case EI_SEAT_STATE_NEW:
|
||||
case EI_SEAT_STATE_REMOVED:
|
||||
return;
|
||||
}
|
||||
|
||||
if (!is_known_cap(cap))
|
||||
return;
|
||||
|
||||
if (!mask_all(seat->capabilities_bound, cap))
|
||||
return;
|
||||
|
||||
mask_remove(seat->capabilities_bound, cap);
|
||||
|
||||
struct ei_device *device;
|
||||
list_for_each(device, &seat->devices, link) {
|
||||
if (ei_device_has_capability(device, cap))
|
||||
ei_device_close(device);
|
||||
}
|
||||
ei_seat_send_bind(seat, seat->capabilities_bound);
|
||||
ei_seat_unbind_capabilities(seat, cap, NULL);
|
||||
}
|
||||
|
||||
_public_ void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue