From 5d0a112cbe36542ad161e6d65de70036cf101f2a Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Sun, 17 Jul 2016 20:17:23 +0900 Subject: [PATCH] Fixed the bug that layout get changed when on rotary event Change-Id: I1769542450c032fc8498c3d6e223b7bba515fc43 --- src/ise.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/ise.cpp b/src/ise.cpp index f527480..13a9167 100644 --- a/src/ise.cpp +++ b/src/ise.cpp @@ -552,12 +552,17 @@ void CCoreEventCallback::on_process_input_device_event(sclu32 &type, sclchar *da if (_context_layout == ISE_LAYOUT_STYLE_EMAIL || _context_layout == ISE_LAYOUT_STYLE_URL || _context_layout == ISE_LAYOUT_STYLE_PASSWORD) - new_layout = ISE_LAYOUT_STYLE_NORMAL; + new_layout = _context_layout; else new_layout = ISE_LAYOUT_STYLE_EMOTICON; break; case ISE_LAYOUT_STYLE_EMOTICON: - new_layout = ISE_LAYOUT_STYLE_NORMAL; + if (_context_layout == ISE_LAYOUT_STYLE_EMAIL || + _context_layout == ISE_LAYOUT_STYLE_URL || + _context_layout == ISE_LAYOUT_STYLE_PASSWORD) + new_layout = _context_layout; + else + new_layout = ISE_LAYOUT_STYLE_NORMAL; break; default: ; @@ -580,7 +585,12 @@ void CCoreEventCallback::on_process_input_device_event(sclu32 &type, sclchar *da new_layout = ISE_LAYOUT_STYLE_EMOTICON; break; case ISE_LAYOUT_STYLE_NUMBER: - new_layout = ISE_LAYOUT_STYLE_NORMAL; + if (_context_layout == ISE_LAYOUT_STYLE_EMAIL || + _context_layout == ISE_LAYOUT_STYLE_URL || + _context_layout == ISE_LAYOUT_STYLE_PASSWORD) + new_layout = _context_layout; + else + new_layout = ISE_LAYOUT_STYLE_NORMAL; break; case ISE_LAYOUT_STYLE_HEX: new_layout = ISE_LAYOUT_STYLE_NUMBER; -- 2.7.4