SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n";
Evas_Event_Key_Down *ev = (Evas_Event_Key_Down *)event;
- if (!ev || !_focused_ic || !_focused_ic->ctx) return ECORE_CALLBACK_RENEW;
+ Ecore_IMF_Context *active_ctx = get_using_ic (ECORE_IMF_INPUT_PANEL_STATE_EVENT, ECORE_IMF_INPUT_PANEL_STATE_SHOW);
+ if (!ev || !active_ctx) return ECORE_CALLBACK_RENEW;
if ((hw_keyboard_num_get () == 0) &&
!strcmp (ev->keyname, KEY_END) &&
- ecore_imf_context_input_panel_state_get (_focused_ic->ctx) != ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
+ ecore_imf_context_input_panel_state_get (active_ctx) != ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
LOGD ("END key is pressed\n");
return ECORE_CALLBACK_CANCEL;
}
{
SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n";
+ Ecore_IMF_Context *active_ctx = get_using_ic (ECORE_IMF_INPUT_PANEL_STATE_EVENT, ECORE_IMF_INPUT_PANEL_STATE_SHOW);
+
Evas_Event_Key_Down *ev = (Evas_Event_Key_Down *)event;
- if (!ev || !_focused_ic || !_focused_ic->ctx) return ECORE_CALLBACK_RENEW;
+ if (!ev || !active_ctx) return ECORE_CALLBACK_RENEW;
if ((hw_keyboard_num_get () == 0) &&
!strcmp (ev->keyname, KEY_END) &&
- ecore_imf_context_input_panel_state_get (_focused_ic->ctx) != ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
+ ecore_imf_context_input_panel_state_get (active_ctx) != ECORE_IMF_INPUT_PANEL_STATE_HIDE) {
LOGD ("END key is released\n");
- isf_imf_context_input_panel_instant_hide (_focused_ic->ctx);
- isf_imf_context_reset (_focused_ic->ctx);
+ isf_imf_context_input_panel_instant_hide (active_ctx);
+ isf_imf_context_reset (active_ctx);
return ECORE_CALLBACK_CANCEL;
}
static void _send_input_panel_hide_request ();
-static Ecore_IMF_Context *_get_using_ic (Ecore_IMF_Input_Panel_Event type, int value) {
+Ecore_IMF_Context *get_using_ic (Ecore_IMF_Input_Panel_Event type, int value) {
Ecore_IMF_Context *using_ic = NULL;
if (show_req_ic)
using_ic = show_req_ic;
LOGD ("[_render_post_cb]\n");
evas_event_callback_del_full (e, EVAS_CALLBACK_RENDER_POST, _render_post_cb, NULL);
conformant_reset_done = EINA_TRUE;
- isf_imf_context_input_panel_send_will_hide_ack (_get_using_ic (ECORE_IMF_INPUT_PANEL_STATE_EVENT, ECORE_IMF_INPUT_PANEL_STATE_SHOW));
+ isf_imf_context_input_panel_send_will_hide_ack (get_using_ic (ECORE_IMF_INPUT_PANEL_STATE_EVENT, ECORE_IMF_INPUT_PANEL_STATE_SHOW));
}
static void _candidate_render_post_cb (void *data, Evas *e, void *event_info)
{
LOGD ("[%s]\n", __func__);
evas_event_callback_del_full (e, EVAS_CALLBACK_RENDER_POST, _candidate_render_post_cb, NULL);
- isf_imf_context_input_panel_send_candidate_will_hide_ack (_get_using_ic (ECORE_IMF_INPUT_PANEL_STATE_EVENT, ECORE_IMF_INPUT_PANEL_STATE_SHOW));
+ isf_imf_context_input_panel_send_candidate_will_hide_ack (get_using_ic (ECORE_IMF_INPUT_PANEL_STATE_EVENT, ECORE_IMF_INPUT_PANEL_STATE_SHOW));
}
static void _clear_will_show_timer ()
static void _event_callback_call (Ecore_IMF_Input_Panel_Event type, int value)
{
- Ecore_IMF_Context *using_ic = _get_using_ic (type, value);
+ Ecore_IMF_Context *using_ic = get_using_ic (type, value);
switch (type) {
case ECORE_IMF_INPUT_PANEL_STATE_EVENT:
LOGD ("No hide timer\n");
}
- isf_imf_context_input_panel_send_candidate_will_hide_ack (_get_using_ic (ECORE_IMF_INPUT_PANEL_STATE_EVENT, ECORE_IMF_INPUT_PANEL_STATE_SHOW));
+ isf_imf_context_input_panel_send_candidate_will_hide_ack (get_using_ic (ECORE_IMF_INPUT_PANEL_STATE_EVENT, ECORE_IMF_INPUT_PANEL_STATE_SHOW));
if (_prop_change_handler) {
ecore_event_handler_del (_prop_change_handler);
_event_callback_call (ECORE_IMF_INPUT_PANEL_STATE_EVENT, ECORE_IMF_INPUT_PANEL_STATE_HIDE);
received_will_hide_event = EINA_TRUE;
- isf_imf_context_input_panel_send_will_hide_ack (_get_using_ic (ECORE_IMF_INPUT_PANEL_STATE_EVENT, ECORE_IMF_INPUT_PANEL_STATE_HIDE));
+ isf_imf_context_input_panel_send_will_hide_ack (get_using_ic (ECORE_IMF_INPUT_PANEL_STATE_EVENT, ECORE_IMF_INPUT_PANEL_STATE_HIDE));
return true;
}