#ifdef HAVE_ECORE_IMF
static void
-_input_panel_hide(Ecore_IMF_Context *ctx)
+_input_panel_hide(Entry *en)
{
Ecore_IMF_Input_Panel_State state;
- state = ecore_imf_context_input_panel_state_get(ctx);
+ if (!en || !en->input_panel_enable || !en->imf_context) return;
+
+ state = ecore_imf_context_input_panel_state_get(en->imf_context);
if (state == ECORE_IMF_INPUT_PANEL_STATE_SHOW)
- ecore_imf_context_input_panel_hide(ctx);
+ ecore_imf_context_input_panel_hide(en->imf_context);
+}
+
+static void
+_input_panel_show(Entry *en)
+{
+ if (!en || !en->input_panel_enable) return;
+
+ if (hide_timer)
+ {
+ ecore_timer_del(hide_timer);
+ hide_timer = NULL;
+ }
+
+ if(!en->imf_context) return;
+ ecore_imf_context_input_panel_show(en->imf_context);
+ focused_entry = en;
}
static Eina_Bool _hide_timer_handler(void *data)
Entry *en = (Entry *)data;
if (!en || !en->imf_context) goto done;
- _input_panel_hide(en->imf_context);
+ _input_panel_hide(en);
done:
hide_timer = NULL;
}
static void
-_input_panel_show(Entry *en)
-{
- if (!en || !en->input_panel_enable) return;
-
- if (hide_timer)
- {
- ecore_timer_del(hide_timer);
- hide_timer = NULL;
- }
-
- if(!en->imf_context) return;
- ecore_imf_context_input_panel_show(en->imf_context);
- focused_entry = en;
-}
-
-static void
_preedit_clear(Entry *en)
{
if (en->preedit_start)
ecore_imf_context_reset(en->imf_context);
if (en->input_panel_enable)
- _input_panel_hide(en->imf_context);
+ _input_panel_hide(en);
#endif
}
if (en->input_panel_enable)
{
- _input_panel_hide(en->imf_context);
+ _input_panel_hide(en);
}
#endif
}