diff options
author | Sung-jae Park <nicesj.park@samsung.com> | 2015-06-09 12:21:36 +0900 |
---|---|---|
committer | Sung-jae Park <nicesj.park@samsung.com> | 2015-06-09 12:21:36 +0900 |
commit | 8f0c972b946b2cab414c46789a78c856a2c2c075 (patch) | |
tree | bcfd6cedff3f9812bc401674b9968e828b460a9e | |
parent | 782b9dc2703dce3d23de065ac38994617697cbdc (diff) | |
download | widget-service-8f0c972b946b2cab414c46789a78c856a2c2c075.tar.gz widget-service-8f0c972b946b2cab414c46789a78c856a2c2c075.tar.bz2 widget-service-8f0c972b946b2cab414c46789a78c856a2c2c075.zip |
Add input node search control APIsubmit/tizen_mobile/20150609.051219accepted/tizen/mobile/20150609.090350
Fix the ioctl return value check error
Change-Id: I8ab68e1e68041693a2a387fff4765137cf67184c
-rw-r--r-- | include/widget_conf.h | 1 | ||||
-rw-r--r-- | src/widget_conf.c | 13 |
2 files changed, 11 insertions, 3 deletions
diff --git a/include/widget_conf.h b/include/widget_conf.h index 7b5f1d8..474fde5 100644 --- a/include/widget_conf.h +++ b/include/widget_conf.h @@ -465,6 +465,7 @@ extern int widget_conf_reactivate_on_pause(void); extern const char * const widget_conf_app_abi(void); extern double widget_conf_visibility_change_delay(void); extern int widget_conf_click_region(void); +extern void widget_conf_set_search_input_node(int flag); #define WIDGET_CONF_BASE_W widget_conf_base_width() #define WIDGET_CONF_BASE_H widget_conf_base_height() diff --git a/src/widget_conf.c b/src/widget_conf.c index 809123c..2dc06ea 100644 --- a/src/widget_conf.c +++ b/src/widget_conf.c @@ -236,8 +236,10 @@ static struct widget_conf s_conf; static struct info { int conf_loaded; + int search_input_node; } s_info = { .conf_loaded = 0, + .search_input_node = 0, }; static void visibility_change_delay_handler(char *buffer) @@ -716,7 +718,7 @@ static char *find_input_device_by_path(const char *name) ErrPrint("close: %d\n", errno); } - if (ret == 0 && !strcasecmp(name, dev_name)) { + if (ret == strlen(name) + 1 && !strcasecmp(name, dev_name)) { return_path = strdup(path); if (!return_path) { ErrPrint("strdup: %d\n", errno); @@ -883,8 +885,8 @@ static char *find_input_device(const char *name) static void input_path_handler(char *buffer) { - if (buffer[0] == '/') { - DbgPrint("Specifying the input device\n"); + if (buffer[0] == '/' || !s_info.search_input_node) { + DbgPrint("Specifying the input device [%d]\n", s_info.search_input_node); s_conf.path.input = strdup(buffer); if (!s_conf.path.input) { ErrPrint("Heap: %d\n", errno); @@ -1047,6 +1049,11 @@ static char *conf_path(void) return path; } +EAPI void widget_conf_set_search_input_node(int flag) +{ + s_info.search_input_node = !!flag; +} + EAPI int widget_conf_load(void) { char *conf_file; |