From f74895c6b7ef5442b1143a6c1f2f9b860114603b Mon Sep 17 00:00:00 2001 From: Ji-Youn Park Date: Tue, 30 Jun 2015 00:02:47 +0900 Subject: [PATCH] ecore_x_xi2: add small code to check device id cancel event only can be dealed in touch device. --- src/lib/ecore_x/xlib/ecore_x_xi2.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/lib/ecore_x/xlib/ecore_x_xi2.c b/src/lib/ecore_x/xlib/ecore_x_xi2.c index ec16896..64c2030 100644 --- a/src/lib/ecore_x/xlib/ecore_x_xi2.c +++ b/src/lib/ecore_x/xlib/ecore_x_xi2.c @@ -150,6 +150,21 @@ _ecore_x_input_shutdown(void) #ifdef ECORE_XI2 #ifdef ECORE_XI2_2 +static Eina_Bool +_ecore_x_input_touch_device_check(int devid) +{ + int i; + Eina_Inlist *l = _ecore_x_xi2_touch_info_list; + Ecore_X_Touch_Device_Info *info = NULL; + + if ((!_ecore_x_xi2_devs) || (!_ecore_x_xi2_touch_info_list)) + return EINA_FALSE; + + EINA_INLIST_FOREACH(l, info) + if (info->devid == devid) return EINA_TRUE; + return EINA_FALSE; +} + static int _ecore_x_input_touch_index_get(int devid, int detail, int event_type) { -- 2.7.4