summaryrefslogtreecommitdiff
path: root/src/lib/elput
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-06-02 18:23:45 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-06-02 18:23:43 -0400
commitbc346d367f403f4f8dfeebcf0043126985969b27 (patch)
tree2bf1abf3691e6d2176f354763176f1e5aaaf8ea5 /src/lib/elput
parentf220f086b991cd3aad306d7cbeb181e531d1dddb (diff)
elput: send extra pointer motion event on first button press after resume
ensure state is reapplied by other components
Diffstat (limited to 'src/lib/elput')
-rw-r--r--src/lib/elput/elput_evdev.c2
-rw-r--r--src/lib/elput/elput_input.c5
-rw-r--r--src/lib/elput/elput_private.h1
3 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
index fca4042681..fd02e2a634 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)
798 798
799 ev = calloc(1, sizeof(Ecore_Event_Mouse_Move)); 799 ev = calloc(1, sizeof(Ecore_Event_Mouse_Move));
800 if (!ev) return; 800 if (!ev) return;
801 edev->seat->pending_motion = 0;
801 802
802 x = ptr->seat->pointer.x; 803 x = ptr->seat->pointer.x;
803 y = ptr->seat->pointer.y; 804 y = ptr->seat->pointer.y;
@@ -1030,6 +1031,7 @@ _pointer_button(struct libinput_device *idev, struct libinput_event_pointer *eve
1030 ptr->timestamp = libinput_event_pointer_get_time(event); 1031 ptr->timestamp = libinput_event_pointer_get_time(event);
1031 1032
1032 if (state) _pointer_click_update(ptr, btn); 1033 if (state) _pointer_click_update(ptr, btn);
1034 if (edev->seat->pending_motion) _pointer_motion_send(edev);
1033 1035
1034 _pointer_button_send(edev, state); 1036 _pointer_button_send(edev, state);
1035 1037
diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c
index de8d067435..aa7351dd69 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)
400void 400void
401_elput_input_disable(Elput_Manager *manager) 401_elput_input_disable(Elput_Manager *manager)
402{ 402{
403 Elput_Seat *seat;
404 Eina_List *l;
405
406 EINA_LIST_FOREACH(manager->input.seats, l, seat)
407 seat->pending_motion = 1;
403 libinput_suspend(manager->input.lib); 408 libinput_suspend(manager->input.lib);
404 _process_events(&manager->input); 409 _process_events(&manager->input);
405 manager->input.suspended = EINA_TRUE; 410 manager->input.suspended = EINA_TRUE;
diff --git a/src/lib/elput/elput_private.h b/src/lib/elput/elput_private.h
index d57c085a9d..d67e5d53ea 100644
--- a/src/lib/elput/elput_private.h
+++ b/src/lib/elput/elput_private.h
@@ -208,6 +208,7 @@ struct _Elput_Seat
208 208
209 Eina_List *devices; 209 Eina_List *devices;
210 Elput_Manager *manager; 210 Elput_Manager *manager;
211 Eina_Bool pending_motion : 1;
211}; 212};
212 213
213struct _Elput_Device 214struct _Elput_Device