diff options
author | Inhong Han <inhong1.han@samsung.com> | 2023-11-27 14:56:55 +0900 |
---|---|---|
committer | Inhong Han <inhong1.han@samsung.com> | 2023-11-27 14:56:55 +0900 |
commit | 6351607fc1f52323b866423a96c4bc01cc203e98 (patch) | |
tree | 7c22e3628952189affcf4b79a06d5f049a31a08f | |
parent | b162f632f3cbc4a83d945bd15e2e04dccb274f04 (diff) | |
download | isf-6351607fc1f52323b866423a96c4bc01cc203e98.tar.gz isf-6351607fc1f52323b866423a96c4bc01cc203e98.tar.bz2 isf-6351607fc1f52323b866423a96c4bc01cc203e98.zip |
Fix vconf type mismatch issue
Change-Id: I7e8ba0efd97d3256749e88da4dd66cf28c731ba9
-rw-r--r-- | ism/extras/wayland_immodule/wayland_imcontext.c | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/ism/extras/wayland_immodule/wayland_imcontext.c b/ism/extras/wayland_immodule/wayland_imcontext.c index ccf99604..724ec07b 100644 --- a/ism/extras/wayland_immodule/wayland_imcontext.c +++ b/ism/extras/wayland_immodule/wayland_imcontext.c @@ -442,10 +442,26 @@ static void input_language_changed_cb (keynode_t *key, void* data) } } +static Eina_Bool get_multiview_mode (const char *multiview_str) +{ + char *mode_str = strstr (multiview_str, "mode"); + if (mode_str) + { + mode_str = strstr (mode_str, "\"on\""); + if (mode_str) + return EINA_TRUE; + } + + return EINA_FALSE; +} + static void multiview_mode_changed_cb (keynode_t *key, void* data) { - multiview_mode = vconf_keynode_get_bool (key); - LOGD("multiview mode : %d", multiview_mode); + char *multiview_str = vconf_keynode_get_str (key); + if (multiview_str) { + multiview_mode = get_multiview_mode (multiview_str); + LOGD("multiview mode : %d", multiview_mode); + } } static Eina_Bool @@ -2990,10 +3006,11 @@ void wayland_im_initialize () hw_keyboard_mode = EINA_TRUE; } - if (vconf_get_bool (VCONFKEY_MULTIVIEW_MODE, &val) == 0) { - LOGD("multiview mode : %d", val); - if (val == EINA_TRUE) - multiview_mode = EINA_TRUE; + char *multiview_str = vconf_get_str (VCONFKEY_MULTIVIEW_MODE); + if (multiview_str) { + multiview_mode = get_multiview_mode (multiview_str); + LOGD("multiview mode : %d", multiview_mode); + free (multiview_str); } if (vconf_notify_key_changed (VCONFKEY_AUTOCAPITAL_ALLOW_BOOL, autocapital_allow_changed_cb, NULL) != 0) |