From: Mike Blumenkrantz Date: Fri, 2 Jun 2017 22:23:45 +0000 (-0400) Subject: elput: send extra pointer motion event on first button press after resume X-Git-Tag: upstream/1.20.0~808 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc346d367f403f4f8dfeebcf0043126985969b27;p=platform%2Fupstream%2Fefl.git elput: send extra pointer motion event on first button press after resume ensure state is reapplied by other components --- diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c index fca4042..fd02e2a 100644 --- a/src/lib/elput/elput_evdev.c +++ b/src/lib/elput/elput_evdev.c @@ -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); diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c index de8d067..aa7351d 100644 --- a/src/lib/elput/elput_input.c +++ b/src/lib/elput/elput_input.c @@ -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; diff --git a/src/lib/elput/elput_private.h b/src/lib/elput/elput_private.h index d57c085..d67e5d5 100644 --- a/src/lib/elput/elput_private.h +++ b/src/lib/elput/elput_private.h @@ -208,6 +208,7 @@ struct _Elput_Seat Eina_List *devices; Elput_Manager *manager; + Eina_Bool pending_motion : 1; }; struct _Elput_Device