From: Ji-hoon Lee Date: Fri, 18 Aug 2017 01:19:00 +0000 (+0900) Subject: Impose a limit on the size of IMEs to avoid client being fully obscured X-Git-Tag: submit/tizen_3.0/20171025.071119~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d673c4d6b6666c2e2c46a9465a1942637b58465;p=platform%2Fcore%2Fuifw%2Flibscl-core.git Impose a limit on the size of IMEs to avoid client being fully obscured Change-Id: Iff67f63e851fd0d774a47d804b2f858453175a76 --- diff --git a/src/legacy_support/websocket.cpp b/src/legacy_support/websocket.cpp index 4a01f12..20841ab 100644 --- a/src/legacy_support/websocket.cpp +++ b/src/legacy_support/websocket.cpp @@ -37,6 +37,10 @@ #define WEBSOCKET_PORT 7681 +#ifdef WAYLAND +#include +#endif + pthread_t g_ws_server_thread = (pthread_t)NULL; pthread_mutex_t g_ws_server_mutex = PTHREAD_MUTEX_INITIALIZER; @@ -1141,6 +1145,23 @@ void CWebHelperAgentWebSocket::handle_recved_message(ISE_MESSAGE &message) LOGD("ISE_MESSAGE_COMMAND_SET_KEYBOARD_SIZES : %d %d %d %d", portrait_width, portrait_height, landscape_width, landscape_height); + +#ifdef WAYLAND + /* Since the full screen IME makes the client application fully obscured, + * when it hides the client receives resume command and try to show IME again. + * So here we are adjusting the height value when the requested keyboard size + * is the same with the screen size, as a workaround */ + int scr_w = 0, scr_h = 0; + ecore_wl_sync(); + ecore_wl_screen_size_get(&scr_w, &scr_h); + if (scr_w == portrait_width && scr_h == portrait_height) { + portrait_height -= 1; + } + if (scr_h == landscape_width && scr_w == landscape_height) { + landscape_height -= 1; + } +#endif + set_keyboard_sizes( portrait_width, portrait_height, landscape_width, landscape_height); }