Fixed the bug that layout get changed when on rotary event 65/80365/2
authorJi-hoon Lee <dalton.lee@samsung.com>
Sun, 17 Jul 2016 11:17:23 +0000 (20:17 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Sun, 17 Jul 2016 11:23:06 +0000 (04:23 -0700)
Change-Id: I1769542450c032fc8498c3d6e223b7bba515fc43

src/ise.cpp

index f527480..13a9167 100644 (file)
@@ -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;