display: get fd from input event 47/55547/2
authorTaeyoung Kim <ty317.kim@samsung.com>
Thu, 24 Dec 2015 10:50:15 +0000 (19:50 +0900)
committerTaeyoung Kim <ty317.kim@samsung.com>
Mon, 28 Dec 2015 08:06:15 +0000 (00:06 -0800)
- fd value was not initialized. Thus the fd is get
  from the input event

Change-Id: I9a159b8c9e7d12175e77f6a2969214dce887da8c
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
src/display/input.c

index f4f71e7..e50435d 100644 (file)
@@ -84,7 +84,14 @@ static inline void process_event(struct libinput_event *ev)
        case LIBINPUT_EVENT_POINTER_MOTION:
        case LIBINPUT_EVENT_POINTER_BUTTON:
        case LIBINPUT_EVENT_POINTER_AXIS:
+               li = libinput_event_get_context(ev);
                input.type = EV_REL;
+
+               fd = libinput_get_fd(li);
+               _D("time %d.%d type %d code %d value %d fd %d",
+                               input.time.tv_sec, input.time.tv_usec, input.type,
+                               input.code, input.value, fd);
+
                if (CHECK_OPS(keyfilter_ops, check) &&
                    keyfilter_ops->check(&input, fd) != 0)
                        return;