FIX: Apply device status at the proper time

This commit is contained in:
Joshua Dickens 2025-10-13 11:07:48 -07:00 committed by Peter Hutterer
parent bea231c4bf
commit b95174849e

View file

@ -1141,7 +1141,6 @@ eis_device_add(struct eis_device *device)
"%s: adding device without capabilities", __func__);
}
device->state = EIS_DEVICE_STATE_AWAITING_READY;
eis_client_register_object(client, &device->proto_object);
eis_seat_event_device(seat, device->proto_object.id, device->proto_object.version);
int rc = eis_device_event_name(device, device->name);
@ -1244,6 +1243,8 @@ eis_device_add(struct eis_device *device)
eis_device_stylus_tool_capabilities(device, 63);
}
device->state = EIS_DEVICE_STATE_AWAITING_READY;
rc = eis_device_event_done(device);
if (rc < 0)
goto out;