Sync with the latest code of phone profile
[platform/framework/web/data-provider-master.git] / src / event.c
index af19f99..0604c11 100644 (file)
@@ -71,6 +71,7 @@ static struct info {
                .y = -1,
                .device = -1,
                .slot = -1,
+               .keycode = 0,
        },
 
        .event_listener_list = NULL,
@@ -178,6 +179,8 @@ static inline int processing_input_event(struct input_event *event)
                }
                break;
        case EV_KEY:
+               DbgPrint("EV_KEY: 0x%X\n", event->value);
+               s_info.event_data.keycode = event->value;
                break;
        case EV_REL:
                break;
@@ -492,7 +495,7 @@ static int activate_thread(void)
                ErrPrint("Error: %s\n", strerror(errno));
        }
 
-       status = pipe2(s_info.evt_pipe, O_NONBLOCK | O_CLOEXEC);
+       status = pipe2(s_info.evt_pipe, O_CLOEXEC);
        if (status < 0) {
                ErrPrint("Unable to prepare evt pipe: %s\n", strerror(errno));
                if (close(s_info.handle) < 0) {
@@ -502,7 +505,7 @@ static int activate_thread(void)
                return LB_STATUS_ERROR_FAULT;
        }
 
-       status = pipe2(s_info.tcb_pipe, O_NONBLOCK | O_CLOEXEC);
+       status = pipe2(s_info.tcb_pipe, O_CLOEXEC);
        if (status < 0) {
                ErrPrint("Unable to prepare tcb pipe: %s\n", strerror(errno));
                if (close(s_info.handle) < 0) {