From: Jihoon Kim Date: Thu, 19 Dec 2024 06:50:13 +0000 (+0900) Subject: Fix logic to exit IME in I/O error X-Git-Tag: accepted/tizen/7.0/unified/20241220.061340~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=68afd6c85f0f991d0d44f6bd6c13456a976c38f5;p=platform%2Fcore%2Fuifw%2Flibscl-core.git Fix logic to exit IME in I/O error Change-Id: I1f8ac4489aa632596d2c6da3719d1df57cddf701 Signed-off-by: Jihoon Kim --- diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index 2e62e28..8aa05c1 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -789,9 +789,7 @@ Eina_Bool input_handler(void *data, Ecore_Fd_Handler *fd_handler) elm_exit(); } } else { - LOGD("helper_agent.has_pending_event() failed!!!\n"); - impl->fini(); - elm_exit(); + LOGE("helper_agent.has_pending_event() failed!!!\n"); } } } @@ -799,10 +797,23 @@ Eina_Bool input_handler(void *data, Ecore_Fd_Handler *fd_handler) return ECORE_CALLBACK_RENEW; } +Eina_Bool input_error_handler(void *data, Ecore_Fd_Handler *fd_handler) +{ + LOGE("I/O Error!!\n"); + CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); + if (impl) { + impl->fini(); + elm_exit(); + } + + return ECORE_CALLBACK_CANCEL; +} + CSCLConnectionISF::CSCLConnectionISF() { m_initialized = FALSE; m_fd_handler = NULL; + m_fd_error_handler = NULL; m_backend_identifier = "ISF"; } @@ -935,6 +946,8 @@ void CSCLConnectionISF::open_connection(const sclchar *display) #endif m_fd_handler = ecore_main_fd_handler_add(fd, ECORE_FD_READ, input_handler, &m_helper_agent, NULL, NULL); + m_fd_error_handler = ecore_main_fd_handler_add(fd, ECORE_FD_ERROR, input_error_handler, &m_helper_agent, NULL, NULL); + g_need_exit = TRUE; } } @@ -947,6 +960,10 @@ void CSCLConnectionISF::close_connection() ecore_main_fd_handler_del(m_fd_handler); m_fd_handler = NULL; } + if (m_fd_error_handler) { + ecore_main_fd_handler_del(m_fd_error_handler); + m_fd_error_handler = NULL; + } m_helper_agent.update_ise_exit(); m_helper_agent.close_connection(); } diff --git a/src/sclconnection-isf.h b/src/sclconnection-isf.h index 1d1f847..7ab2cd2 100644 --- a/src/sclconnection-isf.h +++ b/src/sclconnection-isf.h @@ -108,6 +108,7 @@ private: scim::HelperAgent m_helper_agent; Ecore_Fd_Handler *m_fd_handler; + Ecore_Fd_Handler *m_fd_error_handler; }; }