elput: send extra pointer motion event on first button press after resume

ensure state is reapplied by other components
This commit is contained in:
Mike Blumenkrantz 2017-06-02 18:23:45 -04:00
parent f220f086b9
commit bc346d367f
3 changed files with 8 additions and 0 deletions

View File

@ -798,6 +798,7 @@ _pointer_motion_send(Elput_Device *edev)
ev = calloc(1, sizeof(Ecore_Event_Mouse_Move));
if (!ev) return;
edev->seat->pending_motion = 0;
x = ptr->seat->pointer.x;
y = ptr->seat->pointer.y;
@ -1030,6 +1031,7 @@ _pointer_button(struct libinput_device *idev, struct libinput_event_pointer *eve
ptr->timestamp = libinput_event_pointer_get_time(event);
if (state) _pointer_click_update(ptr, btn);
if (edev->seat->pending_motion) _pointer_motion_send(edev);
_pointer_button_send(edev, state);

View File

@ -400,6 +400,11 @@ _elput_input_enable(Elput_Manager *manager)
void
_elput_input_disable(Elput_Manager *manager)
{
Elput_Seat *seat;
Eina_List *l;
EINA_LIST_FOREACH(manager->input.seats, l, seat)
seat->pending_motion = 1;
libinput_suspend(manager->input.lib);
_process_events(&manager->input);
manager->input.suspended = EINA_TRUE;

View File

@ -208,6 +208,7 @@ struct _Elput_Seat
Eina_List *devices;
Elput_Manager *manager;
Eina_Bool pending_motion : 1;
};
struct _Elput_Device