Update popup open state variable on POPUP_ notification events 13/169513/1 submit/tizen/20180214.005354
authorJi-hoon Lee <dalton.lee@samsung.com>
Wed, 7 Feb 2018 06:49:41 +0000 (15:49 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Wed, 7 Feb 2018 07:08:56 +0000 (16:08 +0900)
Change-Id: I9517049cefb9afb9b842e0fc66f355c9f275be49

src/ise.cpp

index e2a7558..6687421 100644 (file)
@@ -706,6 +706,16 @@ SCLEventReturnType CUIEventCallback::on_event_notification(SCLUINotiType noti_ty
         } else if (0 == strcmp(openedDesc->input_mode, "CM_POPUP")) {
             _cm_popup_opened = TRUE;
         }
+    } else if (noti_type == SCL_UINOTITYPE_POPUP_CLOSED) {
+        g_popup_opened = FALSE;
+        SclNotiPopupClosedDesc *closedDesc = (SclNotiPopupClosedDesc *)etc_info;
+        if (closedDesc && closedDesc->input_mode) {
+            if (0 == strcmp(closedDesc->input_mode, "PUNCTUATION_POPUP")) {
+                g_punctuation_popup_opened = FALSE;
+            } else if (0 == strcmp(closedDesc->input_mode, "CM_POPUP")) {
+                _cm_popup_opened = FALSE;
+            }
+        }
     } else if (noti_type == SCL_UINOTITYPE_INPUT_MODE_CHANGE) {
         SclNotiInputModeChangeDesc *desc = static_cast<SclNotiInputModeChangeDesc*>(etc_info);
         if (desc && g_ui) {
@@ -946,8 +956,6 @@ SCLEventReturnType CUIEventCallback::on_event_key_clicked(SclUIEventDesc event_d
                 }
             } else if (g_punctuation_popup_opened) {
                 update_recent_used_punctuation(event_desc.key_value);
-                g_punctuation_popup_opened = FALSE;
-                g_popup_opened = FALSE;
             }
             break;
         }
@@ -1310,7 +1318,6 @@ ise_show(int ic)
     exit_timer = NULL;
 #endif
     sclboolean reset_inputmode = FALSE;
-    g_popup_opened = FALSE;
     g_input_panel_show = true;
 
     if (g_ui) {
@@ -2137,7 +2144,6 @@ void ise_process_key_event(scim::KeyEvent& key, sclu32 &ret)
         if (g_popup_opened == TRUE) {
             if (back_key_released) {
                 g_ui->close_all_popups();
-                g_popup_opened = FALSE;
             }
             ret = 1;
             return;