2 * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include "sclcoreui-efl.h"
19 #include "sclcoreimpl.h"
20 #include <Elementary.h>
22 #include <appcore-efl.h>
25 #include <vconf-keys.h>
29 #include <Ecore_Wayland.h>
30 #include <input-method-client-protocol.h>
34 #include <X11/Xatom.h>
38 /* This websocket agent is for supporting Tizen 2.X legacy web IMEs that uses websocket */
39 CWebHelperAgentWebSocket g_websocket;
42 static struct appcore_ops ops;
45 struct WaylandKeyboard
48 Ecore_Wl_Window *wl_win;
49 const char *ee_engine;
51 struct wl_surface *surface;
52 struct wl_input_panel *ip;
53 struct wl_output *output;
54 struct wl_input_panel_surface *ips;
57 struct WaylandKeyboard wlkb = {0};
59 #define RENDER_PRE_TIMEOUT 1.0f
60 static Ecore_Timer *_render_pre_timer = NULL;
61 static void delete_render_pre_timer()
63 if (_render_pre_timer) {
64 ecore_timer_del(_render_pre_timer);
65 _render_pre_timer = NULL;
72 CSCLCoreUIEFL::CSCLCoreUIEFL()
74 m_initialized = FALSE;
76 m_backend_identifier = "EFL";
78 m_rotation_degree = 0;
79 m_main_window = SCLWINDOW_INVALID;
84 CSCLCoreUIEFL::~CSCLCoreUIEFL()
88 sclboolean CSCLCoreUIEFL::init()
91 m_rotation_degree = -1;
93 for (int loop = 0;loop < OPTION_WINDOW_TYPE_MAX;loop++) {
94 m_option_window_info[loop].window = SCLWINDOW_INVALID;
104 void CSCLCoreUIEFL::fini()
106 m_initialized = FALSE;
113 sclwindow CSCLCoreUIEFL::get_main_window()
116 return m_main_window;
122 void CSCLCoreUIEFL::set_keyboard_size_hints(SclSize portrait, SclSize landscape)
124 Evas_Object *main_window = NATIVE_WINDOW_CAST(m_main_window);
127 ecore_wl_window_rotation_geometry_set(elm_win_wl_window_get(main_window), 0, 0, 0, portrait.width, portrait.height);
128 ecore_wl_window_rotation_geometry_set(elm_win_wl_window_get(main_window), 90, 0, 0, landscape.height, landscape.width);
129 ecore_wl_window_rotation_geometry_set(elm_win_wl_window_get(main_window), 180, 0, 0, portrait.width, portrait.height);
130 ecore_wl_window_rotation_geometry_set(elm_win_wl_window_get(main_window), 270, 0, 0, landscape.height, landscape.width);
133 ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(main_window), 0, 0, 0, portrait.width, portrait.height);
134 ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(main_window), 90, 0, 0, landscape.height, landscape.width);
135 ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(main_window), 180, 0, 0, portrait.width, portrait.height);
136 ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(main_window), 270, 0, 0, landscape.height, landscape.width);
141 static int language_changed_cb(void *event_info, void* data)
143 char clang[_POSIX_PATH_MAX] = {0};
144 char *vconf_str = vconf_get_str(VCONFKEY_LANGSET);
146 snprintf(clang, sizeof(clang), "%s", vconf_str);
149 LOGD("current language is %s\n", clang);
151 CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
153 ISCLCoreEventCallback *callback = impl->get_core_event_callback();
155 callback->on_set_display_language(clang);
162 static void accessibility_changed_cb(keynode_t *key, void* data)
165 if (vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &vconf_value) == 0) {
166 LOGD("accessibility state : %d\n", vconf_value);
168 CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
170 ISCLCoreEventCallback *callback = impl->get_core_event_callback();
172 callback->on_set_accessibility_state(vconf_value);
179 static void win_rotation_changed_cb(void *data, Evas_Object *obj, void *event)
181 int degree = elm_win_rotation_get(obj);
182 LOGD("rotation angle : %d\n", degree);
184 ISCLCoreEventCallback *callback = NULL;
185 CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
187 callback = impl->get_core_event_callback();
190 CSCLCoreUIEFL *coreui = static_cast<CSCLCoreUIEFL*>(data);
192 coreui->set_screen_rotation_degree(degree);
195 callback->on_set_rotation_degree(degree);
199 static Eina_Bool _client_message_cb(void *data, int type, void *event)
201 Ecore_X_Event_Client_Message *ev = (Ecore_X_Event_Client_Message *)event;
203 ISCLCoreEventCallback *callback = NULL;
204 CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
205 Evas_Object *main_window = NULL;
207 callback = impl->get_core_event_callback();
208 main_window = NATIVE_WINDOW_CAST(impl->get_main_window());
211 #ifndef APPLY_WINDOW_MANAGER_CHANGE
213 if (ev->message_type == ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE) {
214 LOGD("ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE , %d %d\n", ev->data.l[0], gFHiddenState);
215 angle = ev->data.l[0];
216 ise_set_screen_direction(angle);
217 if (!gFHiddenState) {
220 } else if (ev->message_type == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE) {
221 LOGD("ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE , %d\n", ev->data.l[0]);
222 elm_win_keyboard_mode_set(main_window, (Elm_Win_Keyboard_Mode)(ev->data.l[0]));
223 gFHiddenState = !(ev->data.l[0]);
227 if (ev->message_type == ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST) {
228 if (ev->win == elm_win_xwindow_get(main_window)) {
229 int degree = ev->data.l[1];
230 CSCLCoreUIEFL *coreui = static_cast<CSCLCoreUIEFL*>(data);
232 coreui->set_screen_rotation_degree(degree);
234 LOGD("_ECORE_X_ATOM_E_WINDOW_ROTATION_REQUEST, %d\n", degree);
236 callback->on_set_rotation_degree(degree);
238 Ecore_X_Window control_window = 0;
239 Ecore_X_Atom atom = ecore_x_atom_get("_ISF_CONTROL_WINDOW");
240 Ecore_X_Window root = ecore_x_window_root_first_get();
241 if (ecore_x_window_prop_xid_get(root, atom, ECORE_X_ATOM_WINDOW, &control_window, 1) == 1) {
242 ecore_x_client_message32_send(control_window, ECORE_X_ATOM_E_WINDOW_ROTATION_CHANGE_REQUEST,
243 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
244 ev->data.l[0], ev->data.l[1], ev->data.l[2], ev->data.l[3], ev->data.l[4]);
249 return ECORE_CALLBACK_RENEW;
253 int CSCLCoreUIEFL::get_screen_rotation_degree()
258 angle = elm_win_rotation_get(NATIVE_WINDOW_CAST(m_main_window));
260 if (m_rotation_degree == -1) {
264 unsigned long nitems_return;
265 unsigned long bytes_after_return;
266 unsigned char *data_window = NULL;
267 unsigned char *data_angle = NULL;
269 Ecore_X_Window app_window = 0;
271 Evas_Object *keypad_win = NATIVE_WINDOW_CAST(m_main_window);
273 LOGD("Trying to get app window degree for %p\n", keypad_win);
274 Ecore_X_Window win = elm_win_xwindow_get(NATIVE_WINDOW_CAST(keypad_win));
275 ret = XGetWindowProperty((Display *)ecore_x_display_get(),
276 ecore_x_window_root_get(win),
277 ecore_x_atom_get("_ISF_ACTIVE_WINDOW"),
278 0, G_MAXLONG, False, XA_WINDOW, &type_return,
279 &format_return, &nitems_return, &bytes_after_return,
282 if (ret == Success) {
283 if ((type_return == XA_WINDOW) && (format_return == 32) && (data_window)) {
284 app_window = *(Window *)data_window;
286 ret = XGetWindowProperty((Display *)ecore_x_display_get(), app_window,
287 ecore_x_atom_get("_E_ILLUME_ROTATE_WINDOW_ANGLE"),
288 0, G_MAXLONG, False, XA_CARDINAL, &type_return,
289 &format_return, &nitems_return, &bytes_after_return,
292 LOGD("app_window : %p, ret %d, %d, %p\n", app_window, ret, type_return, data_angle);
293 if (ret == Success) {
295 if (type_return == XA_CARDINAL) {
296 angle = *(unsigned int*)data_angle;
297 LOGD("current rotation angle is %p %d\n", app_window, angle);
307 angle = m_rotation_degree;
314 static void signal_handler(int sig) {
320 _wayland_setup(struct WaylandKeyboard *wlkb, Evas_Object *main_window)
322 Eina_Inlist *globals;
323 struct wl_registry *registry;
324 Ecore_Wl_Global *global;
326 if (!(registry = ecore_wl_registry_get()))
329 if (!(globals = ecore_wl_globals_get()))
332 EINA_INLIST_FOREACH(globals, global)
334 if (strcmp(global->interface, "wl_input_panel") == 0)
335 wlkb->ip = (wl_input_panel *)wl_registry_bind(registry, global->id, &wl_input_panel_interface, 1);
336 else if (strcmp(global->interface, "wl_output") == 0)
337 wlkb->output = (wl_output *)wl_registry_bind(registry, global->id, &wl_output_interface, 1);
341 LOGW("Can't get wayland input panel interface\n");
346 LOGW("Can't get wayland output interface\n");
350 wlkb->ee = ecore_evas_ecore_evas_get(evas_object_evas_get(main_window));
352 LOGW("ERROR: Unable to create Ecore_Evas object\n");
356 /* Set input panel surface */
357 LOGD("Setting up input panel\n");
358 wlkb->wl_win = ecore_evas_wayland_window_get(wlkb->ee);
360 LOGW("Couldn't get wayland window\n");
364 ecore_wl_window_type_set(wlkb->wl_win, ECORE_WL_WINDOW_TYPE_NONE);
365 wlkb->surface = ecore_wl_window_surface_create(wlkb->wl_win);
366 if (!wlkb->surface) {
367 LOGW("Couldn't create surface\n");
371 wlkb->ips = wl_input_panel_get_input_panel_surface(wlkb->ip, wlkb->surface);
373 LOGW("Couldn't get input panel surface\n");
377 wl_input_panel_surface_set_toplevel(wlkb->ips, wlkb->output, WL_INPUT_PANEL_SURFACE_POSITION_CENTER_BOTTOM);
383 check_evas_engine(struct WaylandKeyboard *wlkb)
385 Eina_Bool ret = EINA_FALSE;
386 const char *env = getenv("ECORE_EVAS_ENGINE");
389 if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_WAYLAND_SHM)) {
391 } else if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_WAYLAND_EGL)) {
394 LOGW("ERROR: Ecore_Evas does must be compiled with support for Wayland engines\n");
397 } else if (strcmp(env, "wayland_shm") != 0 && strcmp(env, "wayland_egl") != 0) {
398 LOGW("ERROR: ECORE_EVAS_ENGINE must be set to either 'wayland_shm' or 'wayland_egl'\n");
402 wlkb->ee_engine = env;
410 int CSCLCoreUIEFL::create(void *data)
413 if (!check_evas_engine(&wlkb)) {
414 LOGW("_wlkb_check_evas_engine error!\n");
417 LOGD("Selected engine: '%s'\n", wlkb.ee_engine);
420 elm_config_accel_preference_set("3d");
421 elm_policy_set(ELM_POLICY_THROTTLE, ELM_POLICY_THROTTLE_NEVER);
423 Evas_Object *main_window = elm_win_add(NULL, m_appid, ELM_WIN_UTILITY);
425 LOGE("Failed to create main window\n");
429 m_main_window = SCL_WINDOW_CAST(main_window);
432 if (!_wayland_setup(&wlkb, main_window)) {
433 LOGW("ERROR: Unable to setup input panel.\n");
439 elm_win_borderless_set(main_window, EINA_TRUE);
440 elm_win_keyboard_win_set(main_window, EINA_TRUE);
441 elm_win_autodel_set(main_window, EINA_TRUE);
442 elm_win_title_set(main_window, m_appid);
443 elm_win_prop_focus_skip_set(main_window, EINA_TRUE);
444 int rots[] = { 0, 90, 180, 270 };
445 elm_win_wm_rotation_available_rotations_set(main_window, rots, (sizeof(rots) / sizeof(int)));
448 unsigned int set = 1;
449 ecore_x_window_prop_card32_set(elm_win_xwindow_get(main_window),
450 ECORE_X_ATOM_E_WINDOW_ROTATION_SUPPORTED,
453 ecore_x_icccm_name_class_set(elm_win_xwindow_get(main_window), "Virtual Keyboard", "ISF");
456 appcore_set_event_callback(APPCORE_EVENT_LANG_CHANGE, language_changed_cb, NULL);
458 vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, accessibility_changed_cb, NULL);
460 /* Should we call these callback functions here? */
461 language_changed_cb(NULL, NULL);
462 accessibility_changed_cb(NULL, NULL);
464 CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
466 impl->init(m_display);
469 evas_object_smart_callback_add(main_window, "wm,rotation,changed", win_rotation_changed_cb, NULL);
471 Ecore_Event_Handler *XClientMsgHandler =
472 ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, _client_message_cb, this);
475 signal(SIGQUIT, signal_handler);
476 signal(SIGTERM, signal_handler);
477 signal(SIGINT, signal_handler);
478 signal(SIGHUP, signal_handler);
481 evas_object_show(main_window);
487 int CSCLCoreUIEFL::terminate(void *data)
489 CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
493 appcore_set_event_callback(APPCORE_EVENT_LANG_CHANGE, NULL, NULL);
495 vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, accessibility_changed_cb);
498 if (XClientMsgHandler) {
499 ecore_event_handler_del(XClientMsgHandler);
500 XClientMsgHandler = NULL;
507 static int app_create_cb(void *data)
509 CSCLCoreUIEFL *sclui = static_cast<CSCLCoreUIEFL *>(data);
511 return sclui->create(data);
516 static int app_terminate_cb(void *data)
518 CSCLCoreUIEFL *sclui = static_cast<CSCLCoreUIEFL *>(data);
520 return sclui->terminate(data);
525 void CSCLCoreUIEFL::run(const sclchar *display)
527 char **argv = new char*[4];
529 const sclchar *appid = NULL;
531 ops.create = app_create_cb;
532 ops.terminate = app_terminate_cb;
538 CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
540 appid = impl->get_uuid();
549 argv[0] = const_cast<char *> (appid);
550 argv[1] = (char *)"--display";
551 argv[2] = const_cast<char *> (display);
554 LOGD("name : %s\n", appid);
556 appcore_efl_main(appid, &argc, (char ***)&argv, &ops);
561 static void focus_out_cb(void *data, Evas *e, void *event)
563 OptionWindowInfo *info = static_cast<OptionWindowInfo*>(data);
566 CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
568 ISCLCoreEventCallback *callback = impl->get_core_event_callback();
570 callback->on_destroy_option_window(info->window);
574 evas_object_hide(NATIVE_WINDOW_CAST(info->window));
575 evas_object_del(NATIVE_WINDOW_CAST(info->window));
582 set_transient_for_app_window(Evas_Object *window)
584 /* Set a transient window for window stack */
585 /* Gets the current XID of the active window into the root window property */
588 unsigned long nitems_return;
589 unsigned long bytes_after_return;
591 unsigned char *data = NULL;
592 Ecore_X_Window xAppWindow;
593 Ecore_X_Window xWindow = elm_win_xwindow_get(window);
596 ret = XGetWindowProperty((Display *)ecore_x_display_get(), ecore_x_window_root_get(xWindow),
597 ecore_x_atom_get("_ISF_ACTIVE_WINDOW"),
598 0, G_MAXLONG, False, XA_WINDOW, &type_return,
599 &format_return, &nitems_return, &bytes_after_return,
602 if (ret == Success) {
604 if (type_return == XA_WINDOW) {
605 xAppWindow = *(Window *)data;
606 LOGD("TRANSIENT_FOR SET : %x , %x\n", xAppWindow, xWindow);
607 ecore_x_icccm_transient_for_set(xWindow, xAppWindow);
616 set_transient_for_isf_setting_window(Evas_Object *window)
618 /* Set a transient window for window stack */
619 /* Gets the current XID of the active window into the root window property */
622 unsigned long nitems_return;
623 unsigned long bytes_after_return;
625 unsigned char *data = NULL;
626 Ecore_X_Window xControlWindow, xSettingWindow;
627 Ecore_X_Window xWindow = elm_win_xwindow_get(window);
630 ret = XGetWindowProperty((Display *)ecore_x_display_get(), ecore_x_window_root_get(xWindow),
631 ecore_x_atom_get("_ISF_CONTROL_WINDOW"),
632 0, G_MAXLONG, False, XA_WINDOW, &type_return,
633 &format_return, &nitems_return, &bytes_after_return,
636 if (ret == Success) {
638 if (type_return == XA_WINDOW) {
639 xControlWindow = *(Window *)data;
641 ecore_x_window_prop_xid_get(xControlWindow, ecore_x_atom_get("ISF Setting window"),
642 ECORE_X_ATOM_WINDOW, &xSettingWindow, 1);
644 LOGD("TRANSIENT_FOR SET : %x , %x\n", xSettingWindow, xWindow);
645 ecore_x_icccm_transient_for_set(xWindow, xSettingWindow);
653 sclwindow CSCLCoreUIEFL::create_option_window(SCLOptionWindowType type)
655 if (type < 0 || type >= OPTION_WINDOW_TYPE_MAX) {
656 return SCLWINDOW_INVALID;
659 ISCLCoreEventCallback *callback = NULL;
660 CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
662 callback = impl->get_core_event_callback();
664 sclboolean ret = false;
665 callback->on_check_option_window_availability(&ret);
667 LOGW("option_window not available\n");
668 return SCLWINDOW_INVALID;
671 return SCLWINDOW_INVALID;
675 /* Just in case the previous option window for setting application exists */
676 if (type == OPTION_WINDOW_TYPE_SETTING_APPLICATION) {
677 if (m_option_window_info[type].window != SCLWINDOW_INVALID) {
678 destroy_option_window(m_option_window_info[type].window);
682 Evas_Object *window, *bg;
684 window = elm_win_add(NATIVE_WINDOW_CAST(m_main_window), "Option window", ELM_WIN_BASIC);
685 if (!window) return NULL;
687 elm_win_title_set(window, "Option window");
688 bg = elm_bg_add(window);
690 evas_object_del(window);
694 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
695 elm_win_resize_object_add(window, bg);
696 evas_object_show(bg);
699 Evas_Coord win_w = 0, win_h = 0;
700 elm_win_screen_size_get(window, NULL, NULL, &win_w, &win_h);
701 int degree = get_screen_rotation_degree();
702 if (degree == 90 || degree == 270) {
703 evas_object_resize(window, win_h, win_w);
705 evas_object_resize(window, win_w, win_h);
709 int rots[] = { 0, 90, 180, 270 };
710 elm_win_wm_rotation_available_rotations_set(window, rots, (sizeof(rots) / sizeof(int)));
712 elm_win_indicator_mode_set(window, ELM_WIN_INDICATOR_SHOW);
715 callback->on_create_option_window(window, type);
718 if (type == OPTION_WINDOW_TYPE_NORMAL) {
719 Evas *evas = evas_object_evas_get(window);
720 evas_event_callback_add(evas, EVAS_CALLBACK_CANVAS_FOCUS_OUT, focus_out_cb, &m_option_window_info[type]);
721 set_transient_for_app_window(window);
722 } else if (type == OPTION_WINDOW_TYPE_SETTING_APPLICATION) {
723 set_transient_for_isf_setting_window(window);
726 m_option_window_info[type].window = window;
731 bool CSCLCoreUIEFL::show_option_window(SCLOptionWindowType type)
733 if (type < 0 || type >= OPTION_WINDOW_TYPE_MAX) {
734 return SCLWINDOW_INVALID;
737 ISCLCoreEventCallback *callback = NULL;
738 CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
740 callback = impl->get_core_event_callback();
742 sclboolean ret = false;
743 callback->on_check_option_window_availability(&ret);
745 LOGW("option_window not available\n");
753 if (m_option_window_info[type].window != SCLWINDOW_INVALID) {
754 evas_object_show(static_cast<Evas_Object*>(m_option_window_info[type].window));
755 elm_win_raise(static_cast<Evas_Object*>(m_option_window_info[type].window));
762 void CSCLCoreUIEFL::destroy_option_window(sclwindow window)
764 CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
766 ISCLCoreEventCallback *callback = impl->get_core_event_callback();
768 callback->on_destroy_option_window(window);
772 for (int loop = 0;loop < OPTION_WINDOW_TYPE_MAX;loop++) {
773 if (m_option_window_info[loop].window == window) {
774 evas_object_del(NATIVE_WINDOW_CAST(window));
775 m_option_window_info[loop].window = SCLWINDOW_INVALID;
780 void CSCLCoreUIEFL::set_screen_rotation_degree(int degree)
782 m_rotation_degree = degree;
786 static void _render_pre_cb(void *data, Evas *e, void *event_info)
788 LOGD("_render_pre_cb() called, now invoking wl_input_panel_surface_set_ready()");
790 wl_input_panel_surface_set_ready(wlkb.ips, 1);
792 Evas_Object *main_window = NATIVE_WINDOW_CAST(data);
793 evas_event_callback_del_full(evas_object_evas_get(main_window),
794 EVAS_CALLBACK_RENDER_PRE, _render_pre_cb, main_window);
796 delete_render_pre_timer();
799 static Eina_Bool _render_pre_timeout(void *data)
801 LOGD("_render_pre_timer expired, forcing to call _render_pre_cb() callback");
803 _render_pre_cb(data, NULL, NULL);
805 return ECORE_CALLBACK_CANCEL;
809 void CSCLCoreUIEFL::process_keyboard_ui_state_change(KEYBOARD_UI_STATE state)
812 if (state == KEYBOARD_UI_STATE_WILL_SHOW) {
813 evas_event_callback_add(evas_object_evas_get(NATIVE_WINDOW_CAST(m_main_window)),
814 EVAS_CALLBACK_RENDER_PRE, _render_pre_cb, (void*)m_main_window);
815 _render_pre_timer = ecore_timer_add(RENDER_PRE_TIMEOUT, _render_pre_timeout, (void*)m_main_window);
816 LOGD("Registered RENDER_PRE callback, _render_pre_cb() and a timer callback");
817 } else if (state == KEYBOARD_UI_STATE_DID_SHOW) {
818 LOGD("Forcing keyboard window to render");
819 evas_render(evas_object_evas_get(NATIVE_WINDOW_CAST(m_main_window)));