fix bug hide event callback wasn't called when context is deleted 57/17557/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 16 Sep 2013 09:09:01 +0000 (18:09 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 7 Mar 2014 02:28:20 +0000 (11:28 +0900)
Change-Id: I07a8f6c275d741871393ffa3f647063ec5a0f095

ism/extras/efl_immodule/isf_imf_context.cpp
ism/extras/efl_immodule/isf_imf_control_ui.cpp

index 347cc84..57cc725 100644 (file)
@@ -308,6 +308,7 @@ static int      __current_numlock_mask = Mod2Mask;
 #define SHIFT_MODE_DISABLE 0x9fe8
 
 extern Ecore_IMF_Input_Panel_State  input_panel_state;
+extern Ecore_IMF_Input_Panel_State  notified_state;
 extern Ecore_IMF_Context           *input_panel_ctx;
 
 // A hack to shutdown the immodule cleanly even if im_module_exit () is not called when exiting.
@@ -1060,7 +1061,6 @@ isf_imf_context_del (Ecore_IMF_Context *ctx)
     if (!_ic_list) return;
 
     EcoreIMFContextISF *context_scim = (EcoreIMFContextISF*)ecore_imf_context_data_get (ctx);
-    Ecore_IMF_Input_Panel_State input_panel_state = ecore_imf_context_input_panel_state_get (ctx);
 
     if (context_scim) {
         if (context_scim->id != _ic_list->id) {
@@ -1090,8 +1090,8 @@ isf_imf_context_del (Ecore_IMF_Context *ctx)
 
         if (input_panel_ctx == ctx && _scim_initialized) {
             LOGD ("ctx : %p\n", ctx);
-            if (input_panel_state == ECORE_IMF_INPUT_PANEL_STATE_WILL_SHOW ||
-                input_panel_state == ECORE_IMF_INPUT_PANEL_STATE_SHOW) {
+            if (notified_state == ECORE_IMF_INPUT_PANEL_STATE_WILL_SHOW ||
+                notified_state == ECORE_IMF_INPUT_PANEL_STATE_SHOW) {
                 ecore_imf_context_input_panel_hide (ctx);
                 input_panel_event_callback_call (ECORE_IMF_INPUT_PANEL_STATE_EVENT, ECORE_IMF_INPUT_PANEL_STATE_HIDE);
                 isf_imf_context_input_panel_send_will_hide_ack (ctx);
index ef02869..8afbe04 100644 (file)
@@ -50,7 +50,7 @@ static unsigned int       hw_kbd_num = 0;
 static Ecore_Timer       *hide_timer = NULL;
 static Ecore_Timer       *will_show_timer = NULL;
 Ecore_IMF_Input_Panel_State input_panel_state = ECORE_IMF_INPUT_PANEL_STATE_HIDE;
-static Ecore_IMF_Input_Panel_State notified_state = ECORE_IMF_INPUT_PANEL_STATE_HIDE;
+Ecore_IMF_Input_Panel_State notified_state = ECORE_IMF_INPUT_PANEL_STATE_HIDE;
 static int                hide_context_id = -1;
 static Evas              *active_context_canvas = NULL;
 static Ecore_X_Window     active_context_window = -1;