The issue could be found in `input_callback`. Due to not proper
initialization of `input_event_handler_list` `input_callback` just
exits before read the incoming `libinput` event (ie call `libinput_dispatch`).
So these events are collected and lead to memeory/cpu-load leak.
Because the same event will try to call the callback while it will not be
'dispatched'
Change-Id: I3ad336faba40e88caaba988c1e9c0efdc8906823
Signed-off-by: Daniil Ruban <intx82@gmail.com>
struct libinput *li = (struct libinput *) data;
struct libinput_event *li_event = NULL;
- if (!input_event_handler_list)
+ if (!li) {
return G_SOURCE_CONTINUE;
+ }
- if (!li)
+ if (!input_event_handler_list) {
+ libinput_dispatch(li);
return G_SOURCE_CONTINUE;
+ }
libinput_dispatch(li);
-
while ((li_event = libinput_get_event(li))) {
struct input_event event = { 0 , };
};
input_event_handler_list = g_list_append(input_event_handler_list, h);
-
if (cb_id)
*cb_id = h->id;