Don't return error when dispatching didn't queue any event

As reading from timers or evdev does not necessarily mean an input
event is queued and ready to be retrieved with libinput_get_event(),
don't report such behaviour as an error.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Destroy unprocessed events properly when destroying context

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
udev-seat: Don't notify about removal when destroying context

As events will just be destroyed before leaving the libinput scope
during destruction, don't waste time on queueing them.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Destroy associated reference counted objects when destroying context

This avoids issues with device and seat objects depending on a valid
context.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Remove duplicate gitignore entries

Already covered by a global rule

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
gitignore: generalise .libs/ and .deps/

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
gitignore: ignore ctags files

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Localise two variables

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Don't access event buffer after realloc

realloc() may free the original event buffer, don't access it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Always allocate an event queue

On the typical setup we have at least 3 events pending as soon as we hook it
up (seat added, device added, capability). In the udev case we get up to > 64
events without even having input events on my laptop with only two extra
devices connected. So always allocate an event buffer to avoid spurious
resizing.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>