struct libinput_event_device_notify {
struct libinput_event base;
- struct libinput_device *device;
};
struct libinput_event_keyboard {
if (!added_device_event)
return;
- *added_device_event = (struct libinput_event_device_notify) {
- .device = device,
- };
-
post_base_event(device,
LIBINPUT_EVENT_DEVICE_ADDED,
&added_device_event->base);
if (!removed_device_event)
return;
- *removed_device_event = (struct libinput_event_device_notify) {
- .device = device,
- };
-
post_base_event(device,
LIBINPUT_EVENT_DEVICE_REMOVED,
&removed_device_event->base);