eis: start the device IDs at 1

device IDs are combined with the seat ID, let's make sure the lower bits
are never 0 to be able to distinquish between a pure seat ID and a
device ID.

Signed-off-by:	Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2021-07-21 10:33:30 +10:00
parent 2bb846696f
commit 426c92d59c

View file

@ -171,7 +171,7 @@ eis_device_new(struct eis_seat *seat)
static uint32_t deviceid;
struct eis_device *device = eis_device_create(&seat->object);
device->id = seat->id | deviceid++;
device->id = seat->id | ++deviceid;
device->name = xstrdup("unnamed device");
device->capabilities = 0;
device->state = EIS_DEVICE_STATE_NEW;