From 4dd6ac66d3eb9df6c286f92069ccaa03df92a16d Mon Sep 17 00:00:00 2001 From: wonkeun Oh Date: Tue, 11 Aug 2015 19:53:12 +0900 Subject: [PATCH] Removed unused code about checking desktop mode Change-Id: I766f0287770b5104f248c7483180d307e98e0b10 --- ism/extras/efl_immodule/isf_imf_context.cpp | 40 -------------------------- ism/extras/efl_immodule/isf_imf_context.h | 1 - ism/extras/efl_immodule/isf_imf_control_ui.cpp | 11 ------- 3 files changed, 52 deletions(-) diff --git a/ism/extras/efl_immodule/isf_imf_context.cpp b/ism/extras/efl_immodule/isf_imf_context.cpp index 1dd5b8e..94ecd07 100644 --- a/ism/extras/efl_immodule/isf_imf_context.cpp +++ b/ism/extras/efl_immodule/isf_imf_context.cpp @@ -394,7 +394,6 @@ static double space_key_time static Eina_Bool autoperiod_allow = EINA_FALSE; static Eina_Bool autocap_allow = EINA_FALSE; -static Eina_Bool desktop_mode = EINA_FALSE; static bool _x_key_event_is_valid = false; @@ -440,12 +439,6 @@ get_panel_client_id (void) return _panel_client_id; } -EAPI Eina_Bool -get_desktop_mode () -{ - return desktop_mode; -} - /* Function Implementations */ static EcoreIMFContextISFImpl * new_ic_impl (EcoreIMFContextISF *parent) @@ -675,35 +668,6 @@ _key_up_cb (void *data, int type, void *event) return ECORE_CALLBACK_PASS_ON; } -static void -_check_desktop_mode (Ecore_X_Window win) -{ - char *profile = ecore_x_e_window_profile_get (win); - if (profile && (strcmp (profile, "desktop") == 0)) { - desktop_mode = EINA_TRUE; - } else { - desktop_mode = EINA_FALSE; - } - - if (profile) - free (profile); -} - -static Eina_Bool -_x_prop_change (void *data, int type, void *event) -{ - Ecore_X_Event_Window_Property *e = (Ecore_X_Event_Window_Property *)event; - Ecore_X_Window xwin = (Ecore_X_Window)(reinterpret_cast(data)); - - if (!e || e->win != xwin) return ECORE_CALLBACK_PASS_ON; - - if (e->atom == ECORE_X_ATOM_E_PROFILE) { - _check_desktop_mode (e->win); - } - - return ECORE_CALLBACK_PASS_ON; -} - EAPI int register_key_handler () { @@ -1413,10 +1377,6 @@ isf_imf_context_client_window_set (Ecore_IMF_Context *ctx, void *window) if ((context_scim->impl->client_window != 0) && (context_scim->impl->client_window != _client_window)) { _client_window = context_scim->impl->client_window; - - _check_desktop_mode (_client_window); - - ecore_event_handler_add (ECORE_X_EVENT_WINDOW_PROPERTY, _x_prop_change, window); } } } diff --git a/ism/extras/efl_immodule/isf_imf_context.h b/ism/extras/efl_immodule/isf_imf_context.h index 99a62d2..7fa8423 100644 --- a/ism/extras/efl_immodule/isf_imf_context.h +++ b/ism/extras/efl_immodule/isf_imf_context.h @@ -57,7 +57,6 @@ EAPI int register_key_handler (); EAPI int unregister_key_handler (); EAPI int get_panel_client_id (); -EAPI Eina_Bool get_desktop_mode (); EAPI Eina_Bool caps_mode_check (Ecore_IMF_Context *ctx, Eina_Bool force, Eina_Bool noti); EAPI EcoreIMFContextISF *get_focused_ic (); diff --git a/ism/extras/efl_immodule/isf_imf_control_ui.cpp b/ism/extras/efl_immodule/isf_imf_control_ui.cpp index d004fdb..999b365 100644 --- a/ism/extras/efl_immodule/isf_imf_control_ui.cpp +++ b/ism/extras/efl_immodule/isf_imf_control_ui.cpp @@ -582,11 +582,6 @@ void isf_imf_context_input_panel_show (Ecore_IMF_Context* ctx) /* Set the current XID of the active window into the root window property */ save_current_xid (ctx); - if (get_desktop_mode ()) { - LOGD ("IME will not appear in case of desktop mode.\n"); - return; - } - if (kbd_mode == TOOLBAR_KEYBOARD_MODE) { LOGD ("H/W keyboard is existed.\n"); return; @@ -681,17 +676,11 @@ void isf_imf_context_input_panel_hide (Ecore_IMF_Context *ctx) { SECURE_LOGD ("ctx : %p\n", ctx); - if (get_desktop_mode ()) - return; - _input_panel_hide (ctx, EINA_FALSE); } void isf_imf_context_input_panel_instant_hide (Ecore_IMF_Context *ctx) { - if (get_desktop_mode ()) - return; - _input_panel_hide (ctx, EINA_TRUE); } -- 2.7.4