From 6c6aa0da40561159059fc9e65acf75ba51419a9f Mon Sep 17 00:00:00 2001 From: Gwanglim Lee Date: Fri, 18 Dec 2015 13:44:50 +0900 Subject: [PATCH] ecore_wayland: fix comparing keyboard state to state of conformant_area wl event. The state of conformant_area wl event is based on the visibility value of virtual keyboard window. Thus we need to add 1 to it before comparing with keyboard state. Change-Id: I3b1a3dd2c9d154b10f1cd63b16c42e3295a78bfc --- src/lib/ecore_wayland/ecore_wl.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore_wayland/ecore_wl.c b/src/lib/ecore_wayland/ecore_wl.c index 18246fa..fbf3d68 100644 --- a/src/lib/ecore_wayland/ecore_wl.c +++ b/src/lib/ecore_wayland/ecore_wl.c @@ -1318,6 +1318,7 @@ _ecore_wl_cb_conformant_area(void *data EINA_UNUSED, struct tizen_policy *tizen_ Ecore_Wl_Window *win = NULL; int org_x, org_y, org_w, org_h; Eina_Bool changed = EINA_FALSE; + Ecore_Wl_Virtual_Keyboard_State kbd_state; if (!surface) return; win = ecore_wl_window_surface_find(surface); @@ -1345,9 +1346,14 @@ _ecore_wl_cb_conformant_area(void *data EINA_UNUSED, struct tizen_policy *tizen_ ecore_wl_window_keyboard_geometry_set(win, x, y, w, h); changed = EINA_TRUE; } - if (state != ecore_wl_window_keyboard_state_get(win)) + + /* The given state is based on the visibility value of virtual keyboard window. + * Thus we need to add 1 to it before comparing with keyboard state. + */ + kbd_state = ecore_wl_window_keyboard_state_get(win); + if ((state + 1) != (kbd_state)) { - ecore_wl_window_keyboard_state_set(win, state); + ecore_wl_window_keyboard_state_set(win, state + 1); changed = EINA_TRUE; } } -- 2.7.4