From: InHong Han Date: Tue, 2 Feb 2021 07:59:08 +0000 (+0900) Subject: Modified to prevent passing invalid IME geometry to the app X-Git-Tag: accepted/tizen/6.0/unified/20210204.012136~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F96%2F252796%2F3;p=platform%2Fcore%2Fuifw%2Fisf.git Modified to prevent passing invalid IME geometry to the app Change-Id: I9dcce1647589922f3a18f404c796da8f0bca56d2 --- diff --git a/ism/extras/wayland_immodule/wayland_imcontext.c b/ism/extras/wayland_immodule/wayland_imcontext.c index 871bb2d..4a62e10 100644 --- a/ism/extras/wayland_immodule/wayland_imcontext.c +++ b/ism/extras/wayland_immodule/wayland_imcontext.c @@ -141,7 +141,6 @@ static Eina_Bool hw_keyboard_mode = EINA_FALSE; static Eina_Bool _preedit_cursor_changed = EINA_FALSE; static Input_Language input_lang = INPUT_LANG_OTHER; -static Evas_Coord g_scr_w = 0, g_scr_h = 0; static void set_autocapital (Ecore_IMF_Context *ctx); @@ -349,13 +348,8 @@ static Eina_Bool show_input_panel(Ecore_IMF_Context *ctx); static void reset_keyboard_geometry () { - Ecore_Wl2_Display *wl2_display = ecore_wl2_connected_display_get(NULL); - if (wl2_display && (g_scr_w == 0 || g_scr_h == 0)) { - ecore_wl2_sync(); - ecore_wl2_display_screen_size_get(wl2_display, &g_scr_w, &g_scr_h); - } _keyboard_geometry.x = 0; - _keyboard_geometry.y = g_scr_h; + _keyboard_geometry.y = 0; _keyboard_geometry.w = 0; _keyboard_geometry.h = 0; _keyboard_geometry_notified = EINA_FALSE; @@ -2320,7 +2314,9 @@ text_input_input_panel_state(void *data EINA_UNUSED, ECORE_IMF_INPUT_PANEL_STATE_EVENT, _input_panel_state); - if (state == WL_TEXT_INPUT_INPUT_PANEL_STATE_HIDE) { + if (state == WL_TEXT_INPUT_INPUT_PANEL_STATE_HIDE && + !(!_keyboard_geometry.x && !_keyboard_geometry.y && !_keyboard_geometry.w && !_keyboard_geometry.h && + _keyboard_geometry_notified)) { reset_keyboard_geometry(); send_keyboard_geometry_event(imcontext->ctx); }