From df3635c9dc70f21484a44d1091812698a63f6fca Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Wed, 5 Oct 2016 14:09:23 +0900 Subject: [PATCH] Refactoring variable name for understanding clearly Change-Id: I3407585502a71d6011bf2a384b4465af93de6f98 Signed-off-by: Jihoon Kim --- src/e_mod_main.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/e_mod_main.c b/src/e_mod_main.c index 4027143..32c48ab 100644 --- a/src/e_mod_main.c +++ b/src/e_mod_main.c @@ -106,7 +106,8 @@ static uint32_t g_keymap_index = 0; static Eina_Bool g_keyboard_mode_engligh = EINA_TRUE; static Ecore_Timer *g_timer_will_hide = NULL; static enum _E_Input_Panel_State g_input_panel_state = E_INPUT_PANEL_STATE_DID_HIDE; -static E_Client *transient_for_ec = NULL; +static E_Client *client_surface_ec = NULL; + static Eina_List *hooks_ec = NULL; const int WILL_HIDE_TIMER_INTERVAL = 1.0f; @@ -1021,10 +1022,10 @@ _e_text_input_cb_activate(struct wl_client *client, struct wl_resource *resource E_Client *ec = wl_resource_get_user_data(surface); EINA_SAFETY_ON_NULL_GOTO(ec, err); EINA_SAFETY_ON_TRUE_GOTO(e_object_is_del(E_OBJECT(ec)), err); - transient_for_ec = ec; + client_surface_ec = ec; - e_input_panel_transient_for_set(transient_for_ec); - WTI_LOG("TRANSIENT_FOR::Application window's E_Client* value : %p\n", transient_for_ec); + e_input_panel_transient_for_set(client_surface_ec); + WTI_LOG("TRANSIENT_FOR::Application window's E_Client* value : %p\n", client_surface_ec); text_input = wl_resource_get_user_data(resource); g_text_input = text_input; @@ -1223,7 +1224,7 @@ _e_text_input_cb_input_panel_show(struct wl_client *client, struct wl_resource * wl_text_input_send_input_panel_state(text_input->resource, WL_TEXT_INPUT_INPUT_PANEL_STATE_SHOW); - e_input_panel_transient_for_set(transient_for_ec); + e_input_panel_transient_for_set(client_surface_ec); } static void @@ -1592,7 +1593,7 @@ _e_text_input_cb_get_hide_permission(struct wl_client *client EINA_UNUSED, struc { E_Text_Input *text_input = wl_resource_get_user_data(resource); uint32_t permission = 1; - E_Client *ec = NULL; + E_Client *focused_ec = NULL; if (!text_input) { @@ -1602,13 +1603,13 @@ _e_text_input_cb_get_hide_permission(struct wl_client *client EINA_UNUSED, struc return; } - ec = e_client_focused_get(); - if (ec) + focused_ec = e_client_focused_get(); + if (focused_ec) { - if (ec != transient_for_ec) + if (focused_ec != client_surface_ec) { - E_Window_Type focus_win_type = ec->netwm.type; - LOGD("Window ID : 0x%08x, Name : %s, type : %d\n", (unsigned int)e_client_util_win_get(ec), (char *)e_client_util_name_get(ec), focus_win_type); + E_Window_Type focus_win_type = focused_ec->netwm.type; + LOGD("Window ID : 0x%08x, Name : %s, type : %d\n", (unsigned int)e_client_util_win_get(focused_ec), (char *)e_client_util_name_get(focused_ec), focus_win_type); if (focus_win_type == E_WINDOW_TYPE_NOTIFICATION || focus_win_type == E_WINDOW_TYPE_POPUP_MENU) @@ -1919,7 +1920,7 @@ _pol_cb_hook_client_del(void *d EINA_UNUSED, E_Client *ec) if (EINA_UNLIKELY(!ec)) return; - if (ec == transient_for_ec) + if (ec == client_surface_ec) { if (g_input_panel_state == E_INPUT_PANEL_STATE_WILL_HIDE) { @@ -1932,7 +1933,7 @@ _pol_cb_hook_client_del(void *d EINA_UNUSED, E_Client *ec) g_timer_will_hide = NULL; } } - transient_for_ec = NULL; + client_surface_ec = NULL; WTI_LOG("TRANSIENT_FOR::Reset transient_for_ec to NULL\n"); } } -- 2.7.4