evas_events: add missing device information 45/130145/2
authorHosang Kim <hosang12.kim@samsung.com>
Fri, 19 May 2017 08:20:11 +0000 (17:20 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Wed, 24 May 2017 01:58:07 +0000 (01:58 +0000)
Change-Id: I5de5f4ed5ca53d78f6d3903374c371a7b2fcfdad

src/lib/evas/canvas/evas_events.c

index 174a88a..248d41c 100644 (file)
@@ -1261,6 +1261,8 @@ _post_up_handle(Evas *eo_e, unsigned int timestamp, const void *data)
         ev_in.locks = &(e->locks);
         ev_in.timestamp = timestamp;
         ev_in.event_flags = e->default_event_flags;
+        ev_in.dev = _evas_device_top_get(eo_e);
+        if (ev_in.dev) evas_device_ref(ev_in.dev);
 
         EINA_LIST_FOREACH(ins, l, eo_obj_itr)
           {
@@ -1287,6 +1289,7 @@ _post_up_handle(Evas *eo_e, unsigned int timestamp, const void *data)
           }
         post_called = 1;
         _evas_post_event_callback_call(eo_e, e);
+        if (ev_in.dev) _evas_device_unref(ev_in.dev);
      }
    else
      {