summaryrefslogtreecommitdiff
path: root/src/lib/elput
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-05-26 16:34:10 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-05-26 16:27:43 -0400
commited4e54ebe2da6b0c2f04bc118286b1b3251edbd9 (patch)
tree3925e41202b2a3efdaaa1dda976a7a964d522db9 /src/lib/elput
parent6775b23212305c957f4447c708053585f361bb86 (diff)
wayland/drm: create evas_devices and add device pointer to input events
this is still semi-broken if a seat has many pointer-ish type devices since pointer devices in ecore-evas were never correctly implemented to be 1:1 with seat:cursor relationships @feature
Diffstat (limited to 'src/lib/elput')
-rw-r--r--src/lib/elput/elput_evdev.c6
-rw-r--r--src/lib/elput/elput_private.h4
2 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
index a212691787..741d1fdfb2 100644
--- a/src/lib/elput/elput_evdev.c
+++ b/src/lib/elput/elput_evdev.c
@@ -300,6 +300,7 @@ _keyboard_key_send(Elput_Device *dev, enum libinput_key_state state, const char
300 ev->modifiers = dev->seat->modifiers; 300 ev->modifiers = dev->seat->modifiers;
301 ev->timestamp = timestamp; 301 ev->timestamp = timestamp;
302 ev->same_screen = 1; 302 ev->same_screen = 1;
303 ev->dev = dev->evas_device;
303 304
304 ev->window = dev->seat->manager->window; 305 ev->window = dev->seat->manager->window;
305 ev->event_window = dev->seat->manager->window; 306 ev->event_window = dev->seat->manager->window;
@@ -803,6 +804,7 @@ _pointer_motion_send(Elput_Device *edev)
803 ev->root_window = edev->seat->manager->window; 804 ev->root_window = edev->seat->manager->window;
804 ev->timestamp = ptr->timestamp; 805 ev->timestamp = ptr->timestamp;
805 ev->same_screen = 1; 806 ev->same_screen = 1;
807 ev->dev = edev->evas_device;
806 808
807 ev->x = ptr->x; 809 ev->x = ptr->x;
808 ev->y = ptr->y; 810 ev->y = ptr->y;
@@ -912,6 +914,7 @@ _pointer_button_send(Elput_Device *edev, enum libinput_button_state state)
912 ev->root_window = edev->seat->manager->window; 914 ev->root_window = edev->seat->manager->window;
913 ev->timestamp = ptr->timestamp; 915 ev->timestamp = ptr->timestamp;
914 ev->same_screen = 1; 916 ev->same_screen = 1;
917 ev->dev = edev->evas_device;
915 918
916 ev->x = ptr->x; 919 ev->x = ptr->x;
917 ev->y = ptr->y; 920 ev->y = ptr->y;
@@ -1033,6 +1036,7 @@ _pointer_axis_send(Elput_Device *dev, int direction, int value)
1033 ev->root_window = dev->seat->manager->window; 1036 ev->root_window = dev->seat->manager->window;
1034 ev->timestamp = ptr->timestamp; 1037 ev->timestamp = ptr->timestamp;
1035 ev->same_screen = 1; 1038 ev->same_screen = 1;
1039 ev->dev = dev->evas_device;
1036 1040
1037 ev->x = ptr->x; 1041 ev->x = ptr->x;
1038 ev->y = ptr->y; 1042 ev->y = ptr->y;
@@ -1189,6 +1193,7 @@ _touch_motion_send(Elput_Device *dev)
1189 ev->root_window = dev->seat->manager->window; 1193 ev->root_window = dev->seat->manager->window;
1190 ev->timestamp = touch->timestamp; 1194 ev->timestamp = touch->timestamp;
1191 ev->same_screen = 1; 1195 ev->same_screen = 1;
1196 ev->dev = dev->evas_device;
1192 1197
1193 ev->x = lround(touch->x); 1198 ev->x = lround(touch->x);
1194 ev->y = lround(touch->y); 1199 ev->y = lround(touch->y);
@@ -1447,6 +1452,7 @@ _tablet_tool_axis(struct libinput_device *idev, struct libinput_event_tablet_too
1447 ev->root_window = dev->seat->manager->window; 1452 ev->root_window = dev->seat->manager->window;
1448 ev->timestamp = ptr->timestamp; 1453 ev->timestamp = ptr->timestamp;
1449 ev->naxis = num; 1454 ev->naxis = num;
1455 ev->dev = dev->evas_device;
1450 ev->axis = axis = calloc(num, sizeof(Ecore_Axis)); 1456 ev->axis = axis = calloc(num, sizeof(Ecore_Axis));
1451 for (i = 0; i < num; i++) 1457 for (i = 0; i < num; i++)
1452 { 1458 {
diff --git a/src/lib/elput/elput_private.h b/src/lib/elput/elput_private.h
index 982d3f58c0..202c52bbef 100644
--- a/src/lib/elput/elput_private.h
+++ b/src/lib/elput/elput_private.h
@@ -28,6 +28,7 @@
28# include <systemd/sd-login.h> 28# include <systemd/sd-login.h>
29# endif 29# endif
30 30
31#ifndef ELPUT_NODEFS
31# ifdef ELPUT_DEFAULT_LOG_COLOR 32# ifdef ELPUT_DEFAULT_LOG_COLOR
32# undef ELPUT_DEFAULT_LOG_COLOR 33# undef ELPUT_DEFAULT_LOG_COLOR
33# endif 34# endif
@@ -59,7 +60,7 @@ extern int _elput_log_dom;
59# undef CRIT 60# undef CRIT
60# endif 61# endif
61# define CRIT(...) EINA_LOG_DOM_CRIT(_elput_log_dom, __VA_ARGS__) 62# define CRIT(...) EINA_LOG_DOM_CRIT(_elput_log_dom, __VA_ARGS__)
62 63#endif
63typedef struct _Elput_Interface 64typedef struct _Elput_Interface
64{ 65{
65 Eina_Bool (*connect)(Elput_Manager **manager, const char *seat, unsigned int tty); 66 Eina_Bool (*connect)(Elput_Manager **manager, const char *seat, unsigned int tty);
@@ -218,6 +219,7 @@ struct _Elput_Device
218 Elput_Device_Caps caps; 219 Elput_Device_Caps caps;
219 220
220 Eina_Hash *key_remap_hash; 221 Eina_Hash *key_remap_hash;
222 Eo *evas_device;
221 223
222 Eina_Bool left_handed : 1; 224 Eina_Bool left_handed : 1;
223 Eina_Bool key_remap : 1; 225 Eina_Bool key_remap : 1;