DSLibinput: init/shutdown ecore system to use ecore fd handler 07/241607/1
authorjeon <jhyuni.kang@samsung.com>
Fri, 10 Jul 2020 05:06:22 +0000 (14:06 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Thu, 20 Aug 2020 09:53:37 +0000 (18:53 +0900)
Change-Id: I410cf725045082983e49f7617b92b1a0fb00031a

src/DSInput/DSLibinput.cpp

index e6c2683..2515654 100644 (file)
@@ -14,6 +14,7 @@ const struct ::libinput_interface DSLibinput::__input_interface = {
 DSLibinput::DSLibinput(DSInputPrivate *p_ptr)
 {
        inputPrivate = p_ptr;
+       ecore_init();
        __udev = udev_new();
        __libinput = libinput_udev_create_context(&__input_interface, this, __udev);
 
@@ -35,6 +36,7 @@ DSLibinput::~DSLibinput()
        {
                ecore_main_fd_handler_del(__libinput_handler);
        }
+       ecore_shutdown();
        libinput_unref(__libinput);
        udev_unref(__udev);
 }
@@ -114,12 +116,10 @@ Eina_Bool DSLibinput::__handleEvents(void *data, Ecore_Fd_Handler *hdlr)
 
 void DSLibinput::__processDeviceAddEvent(struct ::libinput_event *event)
 {
-       struct ::libinput *libinput;
        struct ::libinput_seat *libinput_seat;
        struct ::libinput_device *device;
        std::string seatName, devName, identifier;
 
-       libinput = libinput_event_get_context(event);
        device = libinput_event_get_device(event);
        libinput_seat = libinput_device_get_seat(device);
 
@@ -143,12 +143,10 @@ void DSLibinput::__processDeviceAddEvent(struct ::libinput_event *event)
 
 void DSLibinput::__processDeviceRemoveEvent(struct ::libinput_event *event)
 {
-       struct ::libinput *libinput;
        struct ::libinput_seat *libinput_seat;
        struct ::libinput_device *device;
        std::string seatName, devName, identifier;
 
-       libinput = libinput_event_get_context(event);
        device = libinput_event_get_device(event);
        libinput_seat = libinput_device_get_seat(device);