mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-02 09:50:09 +01:00
Add a helper function for initializing an event listener
Not needed right now as everything assumes the listener was added before it was removed. This helper is for the cases where we may call listener_remove before it was ever added. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
e6806ce292
commit
d17e84fc0f
2 changed files with 9 additions and 0 deletions
|
|
@ -466,6 +466,9 @@ void
|
|||
libinput_device_set_device_group(struct libinput_device *device,
|
||||
struct libinput_device_group *group);
|
||||
|
||||
void
|
||||
libinput_device_init_event_listener(struct libinput_event_listener *listener);
|
||||
|
||||
void
|
||||
libinput_device_add_event_listener(struct libinput_device *device,
|
||||
struct libinput_event_listener *listener,
|
||||
|
|
|
|||
|
|
@ -1944,6 +1944,12 @@ libinput_dispatch(struct libinput *libinput)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
libinput_device_init_event_listener(struct libinput_event_listener *listener)
|
||||
{
|
||||
list_init(&listener->link);
|
||||
}
|
||||
|
||||
void
|
||||
libinput_device_add_event_listener(struct libinput_device *device,
|
||||
struct libinput_event_listener *listener,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue