mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-05-08 22:08:42 +02:00
eis: fix the seat assignment
We're using the upper bits for seats, just adding 1 clashes with the device ids. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
1134630655
commit
eaefaecdd0
2 changed files with 4 additions and 3 deletions
|
|
@ -391,7 +391,7 @@ handle_msg_device_added(struct ei *ei, uint32_t deviceid, uint32_t seatid,
|
||||||
* won't know which unless we keep some device ID table. Not worth
|
* won't know which unless we keep some device ID table. Not worth
|
||||||
* it, so just silently ignore */
|
* it, so just silently ignore */
|
||||||
if (ei_seat_find_device(seat, deviceid)) {
|
if (ei_seat_find_device(seat, deviceid)) {
|
||||||
log_error(ei, "Server sent duplicate device id %d\n", deviceid);
|
log_error(ei, "Server sent duplicate device id %#x\n", deviceid);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,10 +64,11 @@ eis_seat_get_client(struct eis_seat *seat)
|
||||||
_public_ struct eis_seat *
|
_public_ struct eis_seat *
|
||||||
eis_client_new_seat(struct eis_client *client, const char *name)
|
eis_client_new_seat(struct eis_client *client, const char *name)
|
||||||
{
|
{
|
||||||
static uint32_t seatid = 0x10000; /* we leave the lower bits to the deviceids */
|
static uint32_t seatid;
|
||||||
struct eis_seat *seat = eis_seat_create(&client->object);
|
struct eis_seat *seat = eis_seat_create(&client->object);
|
||||||
|
|
||||||
seat->id = seatid++;
|
/* we leave the lower bits to the deviceids */
|
||||||
|
seat->id = ++seatid << 16;
|
||||||
seat->state = EIS_SEAT_STATE_PENDING;
|
seat->state = EIS_SEAT_STATE_PENDING;
|
||||||
seat->name = xstrdup(name);
|
seat->name = xstrdup(name);
|
||||||
list_init(&seat->devices);
|
list_init(&seat->devices);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue