Removed unused code about checking desktop mode 18/45818/1
authorwonkeun Oh <wonkeun.oh@samsung.com>
Tue, 11 Aug 2015 10:53:12 +0000 (19:53 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 11 Aug 2015 13:09:45 +0000 (22:09 +0900)
Change-Id: I766f0287770b5104f248c7483180d307e98e0b10

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

index 1dd5b8e..94ecd07 100644 (file)
@@ -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<long>(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);
         }
     }
 }
index 99a62d2..7fa8423 100644 (file)
@@ -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 ();
index d004fdb..999b365 100644 (file)
@@ -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);
 }