devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5db91e3802bd7084a2df7c79300e91e7b0d10ce6

commit 5db91e3802bd7084a2df7c79300e91e7b0d10ce6
Author: Chris Michael <cpmich...@osg.samsung.com>
Date:   Wed Apr 6 10:38:08 2016 -0400

    elput: Create and send seat frame events when we need to
    
    Signed-off-by: Chris Michael <cpmich...@osg.samsung.com>
---
 src/lib/elput/Elput.h       |  7 +++++++
 src/lib/elput/elput.c       |  3 +++
 src/lib/elput/elput_evdev.c | 17 +++++++++++++----
 3 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/lib/elput/Elput.h b/src/lib/elput/Elput.h
index 90cfe77..97b184b 100644
--- a/src/lib/elput/Elput.h
+++ b/src/lib/elput/Elput.h
@@ -52,7 +52,14 @@ typedef struct _Elput_Event_Seat_Caps
    Elput_Seat *seat;
 } Elput_Event_Seat_Caps;
 
+/* structure to represent event for seat frame */
+typedef struct _Elput_Event_Seat_Frame
+{
+   Elput_Seat *seat;
+} Elput_Event_Seat_Frame;
+
 EAPI extern int ELPUT_EVENT_SEAT_CAPS;
+EAPI extern int ELPUT_EVENT_SEAT_FRAME;
 
 /**
  * @file
diff --git a/src/lib/elput/elput.c b/src/lib/elput/elput.c
index ef2ca6b..9a673da 100644
--- a/src/lib/elput/elput.c
+++ b/src/lib/elput/elput.c
@@ -7,6 +7,7 @@ static int _elput_init_count = 0;
 int _elput_log_dom = -1;
 
 EAPI int ELPUT_EVENT_SEAT_CAPS = -1;
+EAPI int ELPUT_EVENT_SEAT_FRAME = -1;
 
 EAPI int
 elput_init(void)
@@ -26,6 +27,7 @@ elput_init(void)
      }
 
    ELPUT_EVENT_SEAT_CAPS = ecore_event_type_new();
+   ELPUT_EVENT_SEAT_FRAME = ecore_event_type_new();
 
    return _elput_init_count;
 
@@ -48,6 +50,7 @@ elput_shutdown(void)
    if (--_elput_init_count != 0) return _elput_init_count;
 
    ELPUT_EVENT_SEAT_CAPS = -1;
+   ELPUT_EVENT_SEAT_FRAME = -1;
 
    eina_log_domain_unregister(_elput_log_dom);
    _elput_log_dom = -1;
diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
index a0dc07e..2036d17 100644
--- a/src/lib/elput/elput_evdev.c
+++ b/src/lib/elput/elput_evdev.c
@@ -16,6 +16,18 @@ _seat_caps_update(Elput_Seat *seat)
    ecore_event_add(ELPUT_EVENT_SEAT_CAPS, ev, NULL, NULL);
 }
 
+static void
+_seat_frame_send(Elput_Seat *seat)
+{
+   Elput_Event_Seat_Frame *ev;
+
+   ev = calloc(1, sizeof(Elput_Event_Seat_Frame));
+   if (!ev) return;
+
+   ev->seat = seat;
+   ecore_event_add(ELPUT_EVENT_SEAT_FRAME, ev, NULL, NULL);
+}
+
 static int
 _keyboard_fd_get(off_t size)
 {
@@ -373,10 +385,7 @@ _evdev_event_process(struct libinput_event *event)
         Elput_Device *edev;
 
         edev = libinput_device_get_user_data(idev);
-        if (edev)
-          {
-             /* TODO: send seat frame event ?? */
-          }
+        if (edev) _seat_frame_send(edev->seat);
      }
 
    return ret;

-- 


Reply via email to