Modified to not send set_ready request on dotnet IME 79/260079/2
authorInHong Han <inhong1.han@samsung.com>
Fri, 18 Jun 2021 04:12:32 +0000 (13:12 +0900)
committerInHong Han <inhong1.han@samsung.com>
Fri, 18 Jun 2021 08:06:49 +0000 (17:06 +0900)
Change-Id: Id49f0d4b0496fcdbd3234218e00e1cad99b3bf53

src/sclcore.cpp
src/sclcore.h
src/sclcoreimpl.cpp
src/sclcoreimpl.h
src/sclcoreui-efl.cpp
src/sclcoreui-efl.h
src/sclcoreui.cpp
src/sclcoreui.h

index 20e791b..781ad8a 100644 (file)
@@ -484,4 +484,11 @@ void CSCLCore::send_key_event_processing_result(scim::KeyEvent &key, sclu32 seri
     if (m_impl) {
         m_impl->send_key_event_processing_result(key, serial, is_success);
     }
+}
+
+void CSCLCore::set_dotnet_flag(sclboolean flag)
+{
+    if (m_impl) {
+        m_impl->set_dotnet_flag(flag);
+    }
 }
\ No newline at end of file
index 5ce86b5..78d4534 100644 (file)
@@ -489,6 +489,11 @@ public:
      */
     void send_key_event_processing_result(scim::KeyEvent &key, sclu32 serial, sclboolean is_success);
 
+    /**
+     * @brief Request to distinguish whether IME is a C# application or not.
+     */
+    void set_dotnet_flag(sclboolean flag);
+
 
 private:
     CSCLCoreImpl *m_impl;
index 5876aab..63cecd4 100644 (file)
@@ -30,7 +30,7 @@ CSCLCoreImpl::CSCLCoreImpl()
     m_uuid = NULL;
 
     m_window_created = FALSE;
-    m_window_creation_defer_flag = FALSE;
+    m_window_creation_defer_flag = TRUE;
 }
 
 CSCLCoreImpl::~CSCLCoreImpl()
@@ -477,4 +477,9 @@ void CSCLCoreImpl::set_engine_loader_flag(sclboolean flag)
 void CSCLCoreImpl::send_key_event_processing_result(scim::KeyEvent &key, sclu32 serial, sclboolean is_success)
 {
     m_connection.send_key_event_processing_result(key, serial, is_success);
+}
+
+void CSCLCoreImpl::set_dotnet_flag(sclboolean flag)
+{
+    m_core_ui.set_dotnet_flag(flag);
 }
\ No newline at end of file
index 40fec01..65a76c7 100644 (file)
@@ -123,6 +123,7 @@ public:
     void set_candidate_style(scim::ISF_CANDIDATE_PORTRAIT_LINE_T portrait_line, scim::ISF_CANDIDATE_MODE_T mode);
     void set_engine_loader_flag(sclboolean flag);
     void send_key_event_processing_result(scim::KeyEvent &key, sclu32 serial, sclboolean is_success);
+    void set_dotnet_flag(sclboolean flag);
 private:
     ISCLCoreEventCallback *m_event_callback;
 
index 1319054..0693f10 100644 (file)
@@ -84,6 +84,7 @@ CSCLCoreUIEFL::CSCLCoreUIEFL()
     m_portrait_size.height = 0;
     m_landscape_size.width = 0;
     m_landscape_size.height = 0;
+    m_dotnet_flag = false;
 
     memset(m_option_window_info, 0x00, sizeof(m_option_window_info));
 }
@@ -179,6 +180,12 @@ void CSCLCoreUIEFL::get_keyboard_size(SclSize *portrait, SclSize *landscape)
     *landscape = m_landscape_size;
 }
 
+void CSCLCoreUIEFL::set_dotnet_flag(sclboolean flag)
+{
+    LOGD("IME is called from dotnet");
+    m_dotnet_flag = flag;
+}
+
 #ifdef WAYLAND
 static int language_changed_cb(void *event_info, void* data)
 {
@@ -859,6 +866,8 @@ static Eina_Bool _render_pre_timeout(void *data)
 
 void CSCLCoreUIEFL::process_keyboard_ui_state_change(KEYBOARD_UI_STATE state)
 {
+    if (m_dotnet_flag) return;
+
 #ifdef WAYLAND
     if (state == KEYBOARD_UI_STATE_WILL_SHOW) {
         evas_event_callback_add(evas_object_evas_get(NATIVE_WINDOW_CAST(m_main_window)),
index df11037..3a1b2c5 100644 (file)
@@ -64,6 +64,7 @@ public:
 
     void update_keyboard_geometry(SclSize portrait, SclSize landscape);
     void get_keyboard_size(SclSize *portrait, SclSize *landscape);
+    void set_dotnet_flag(sclboolean flag);
 private:
     sclboolean m_initialized;
 
@@ -75,6 +76,8 @@ private:
     SclSize m_landscape_size;
 
     OptionWindowInfo m_option_window_info[OPTION_WINDOW_TYPE_MAX];
+
+    sclboolean m_dotnet_flag;
 };
 
 }
index 8fa0e26..b6a3492 100644 (file)
@@ -153,3 +153,10 @@ void CSCLCoreUI::get_keyboard_size(SclSize *portrait, SclSize *landscape)
         m_impl->get_keyboard_size(portrait, landscape);
     }
 }
+
+void CSCLCoreUI::set_dotnet_flag(sclboolean flag)
+{
+    if (m_impl) {
+        m_impl->set_dotnet_flag(flag);
+    }
+}
\ No newline at end of file
index 738c985..95b030a 100644 (file)
@@ -111,6 +111,11 @@ public:
      */
     virtual void get_keyboard_size(SclSize *portrait, SclSize *landscape);
 
+    /**
+     * @brief Requests to set dotnet flag
+     */
+    virtual void set_dotnet_flag(sclboolean flag);
+
 protected:
     std::string m_backend_identifier;