eis: default the client to only the capabilities we know about

Let's not pretend we support capabilities we don't actually know about.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2022-08-01 11:52:07 +10:00
parent b3e4f8fc25
commit 8eee092568

View file

@ -675,7 +675,11 @@ eis_client_new(struct eis *eis, int fd)
client->source = source_ref(s);
client->state = EIS_CLIENT_STATE_NEW;
client->restrictions.cap_allow_mask = ~0U;
client->restrictions.cap_allow_mask =
bit(EIS_DEVICE_CAP_KEYBOARD) |
bit(EIS_DEVICE_CAP_POINTER) |
bit(EIS_DEVICE_CAP_POINTER_ABSOLUTE) |
bit(EIS_DEVICE_CAP_TOUCH);
eis_add_client(eis, eis_client_ref(client));