Tizen 2.4 SDK Rev5 accepted/tizen_2.3.1_mobile accepted/tizen_2.3.1_wearable tizen_2.3.1 accepted/tizen/2.3.1/mobile/20160414.075916 accepted/tizen/2.3.1/wearable/20160414.080050 submit/tizen_2.3.1/20160414.052920
authorJaekyu Park <jk7744.park@samsung.com>
Tue, 12 Apr 2016 12:35:36 +0000 (21:35 +0900)
committerJaekyu Park <jk7744.park@samsung.com>
Tue, 12 Apr 2016 12:35:36 +0000 (21:35 +0900)
ism/extras/efl_panel/isf_panel_efl.cpp
ism/src/scim_panel_agent.cpp
ism/src/scim_socket.cpp
ism/src/scim_transaction.cpp
ism/src/scim_utility.cpp

index f092c8e..d3672a8 100644 (file)
@@ -3020,6 +3020,8 @@ static void ui_create_native_candidate_window (void)
         elm_scroller_policy_set (_candidate_0_scroll, ELM_SCROLLER_POLICY_AUTO, ELM_SCROLLER_POLICY_OFF);
         evas_object_resize (_candidate_0_scroll, _candidate_scroll_0_width_min, (_item_min_height+2)*_candidate_port_line-2);
         evas_object_move (_candidate_0_scroll, _candidate_area_1_pos[0], _candidate_area_1_pos[1]);
+
+        /* Create candidate table */
         _candidate_0_table = elm_table_add (_candidate_window);
         evas_object_size_hint_weight_set (_candidate_0_table, 0.0, 0.0);
         evas_object_size_hint_align_set (_candidate_0_table, 0.0, 0.0);
@@ -3054,6 +3056,8 @@ static void ui_create_native_candidate_window (void)
         evas_object_resize (_scroller_bg, _candidate_scroll_width, _candidate_scroll_height_max + 6);
         elm_scroller_page_size_set (_candidate_scroll, 0, _item_min_height+_v_padding);
         evas_object_move (_candidate_scroll, 0, _candidate_port_height_min);
+
+        /* Create candidate table */
         _candidate_table = elm_table_add (_candidate_window);
         evas_object_size_hint_weight_set (_candidate_table, 0.0, 0.0);
         evas_object_size_hint_align_set (_candidate_table, 0.0, 0.0);
@@ -3186,8 +3190,51 @@ static void ui_destroy_candidate_window (void)
         _aux_area         = NULL;
         _candidate_area_1 = NULL;
         _candidate_area_2 = NULL;
-        _scroller_bg      = NULL;
-        _tts_focus_rect   = NULL;
+    }
+
+    if (_tts_focus_rect) {
+        evas_object_del (_tts_focus_rect);
+        _tts_focus_rect = NULL;
+    }
+
+    if (_candidate_bg) {
+        evas_object_del (_candidate_bg);
+        _candidate_bg = NULL;
+    }
+
+    if (_more_btn) {
+        evas_object_del (_more_btn);
+        _more_btn = NULL;
+    }
+
+    if (_scroller_bg) {
+        evas_object_del (_scroller_bg);
+        _scroller_bg = NULL;
+    }
+
+    if (_close_btn) {
+        evas_object_del (_close_btn);
+        _close_btn = NULL;
+    }
+
+    if (_aux_line) {
+        evas_object_del (_aux_line);
+        _aux_line = NULL;
+    }
+
+    if (_tmp_candidate_text) {
+        evas_object_del (_tmp_candidate_text);
+        _tmp_candidate_text = NULL;
+    }
+
+    if (_tmp_preedit_text) {
+        evas_object_del (_tmp_preedit_text);
+        _tmp_preedit_text = NULL;
+    }
+
+    if (_tmp_aux_text) {
+        evas_object_del (_tmp_aux_text);
+        _tmp_aux_text = NULL;
     }
 
     if (_preedit_text) {
@@ -3768,6 +3815,8 @@ static void hide_ise ()
     if (_candidate_window) {
         if (_panel_agent->get_current_toolbar_mode () == TOOLBAR_KEYBOARD_MODE)
             ui_candidate_hide (true, true, true);
+        else
+            ui_candidate_hide (true, false, true);
     }
 }
 
@@ -6583,6 +6632,7 @@ int main (int argc, char *argv [])
 #endif
 
 cleanup:
+    ui_destroy_candidate_window ();
     ui_candidate_delete_check_size_timer ();
     ui_candidate_delete_longpress_timer ();
     ui_candidate_delete_destroy_timer ();
@@ -6593,6 +6643,8 @@ cleanup:
 
     unregister_edbus_signal_handler ();
 
+    elm_shutdown ();
+
     if (!_config.null ())
         _config.reset ();
     if (config_module)
index 47a3c01..9a88710 100644 (file)
@@ -1847,8 +1847,8 @@ public:
         uint32 context;
         if (m_recv_trans.get_data (client) && m_recv_trans.get_data (context)) {
             SCIM_DEBUG_MAIN(4) << __func__ << " (client:" << client << " context:" << context << ")\n";
-            if ((m_panel_client_map[client_id] == m_current_socket_client || client_id == m_show_request_client_id)
-                && (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)) {
+            if (m_panel_client_map[client_id] == m_current_socket_client || client_id == m_show_request_client_id) {
+//                && (TOOLBAR_HELPER_MODE == m_current_toolbar_mode || m_current_helper_option & ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT)) {
                 int    focused_client;
                 uint32 focused_context;
                 get_focused_context (focused_client, focused_context);
index 9902226..475d21e 100644 (file)
@@ -147,7 +147,7 @@ public:
         if (m_data) delete m_data;
     }
 
-    const SocketAddressImpl & operator = (const SocketAddressImpl &other) {
+    SocketAddressImpl & operator = (const SocketAddressImpl &other) {
         m_family = other.m_family;
         m_address = other.m_address;
         if (m_data)
index 21ae289..40cd72a 100644 (file)
@@ -90,7 +90,7 @@ public:
         free (m_buffer);
     }
 
-    const TransactionHolder & operator = (const TransactionHolder &other) {
+    TransactionHolder & operator = (const TransactionHolder &other) {
         m_ref = other.m_ref;
         m_buffer_size = other.m_buffer_size;
         m_write_pos = other.m_write_pos;
index 38669d6..c6bbb9b 100755 (executable)
@@ -652,15 +652,18 @@ EAPI String
 scim_get_home_dir ()
 {
     const char * home_dir = 0;
-
-    struct passwd *pw;
+    struct passwd pw;
+    struct passwd *result;
+    char buf [2048] = {0,};
 
     setpwent ();
-    pw = getpwuid (getuid ());
+    getpwuid_r (getuid (), &pw, buf, sizeof (buf), &result);
     endpwent ();
 
-    if (pw) {
-        home_dir = pw->pw_dir;
+    if (result && pw.pw_dir) {
+        home_dir = pw.pw_dir;
+    } else {
+        LOGD ("Fail to getpwuid_r");
     }
 
     if (!home_dir) {
@@ -676,17 +679,20 @@ scim_get_home_dir ()
 EAPI String
 scim_get_user_name ()
 {
-    struct passwd *pw;
     const char *user_name;
+    struct passwd pw;
+    struct passwd *result;
+    char buf [2048] = {0,};
 
     setpwent ();
-    pw = getpwuid (getuid ());
+    getpwuid_r (getuid (), &pw, buf, sizeof (buf), &result);
     endpwent ();
 
-    if (pw && pw->pw_name)
-        return String (pw->pw_name);
-    else if ((user_name = getenv ("USER")) != NULL)
+    if (result && pw.pw_name) {
+        return String (pw.pw_name);
+    } else if ((user_name = getenv ("USER")) != NULL) {
         return String (user_name);
+    }
 
     char uid_str [10];