Merge "Make lws_create_context() to fail if unable to bind" into tizen
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 5 Oct 2021 08:32:52 +0000 (08:32 +0000)
committerGerrit Code Review <gerrit@review>
Tue, 5 Oct 2021 08:32:52 +0000 (08:32 +0000)
packaging/libscl-core.spec
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 f24c972..e740b71 100644 (file)
@@ -8,7 +8,7 @@
 
 Name:       libscl-core
 Summary:    A library for developing software keyboards
-Version:    0.9.3
+Version:    0.9.6
 Release:    1
 Group:      Graphics & UI Framework/Input
 License:    Apache-2.0
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 3d3a157..99f38ec 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)
 {
@@ -408,11 +415,6 @@ _wayland_setup(struct WaylandKeyboard *wlkb, Evas_Object *main_window)
     }
 
     ecore_wl2_window_type_set(wlkb->wl_win, ECORE_WL2_WINDOW_TYPE_NONE);
-    Ecore_Wl2_Surface *surface = ecore_wl2_surface_create(wlkb->wl_win, EINA_TRUE);
-    if (!surface) {
-        LOGW("Couldn't create surface\n");
-        return false;
-    }
 
     wlkb->surface = ecore_wl2_window_surface_get(wlkb->wl_win);
     if (!wlkb->surface) {
@@ -706,9 +708,9 @@ sclwindow CSCLCoreUIEFL::create_option_window(SCLOptionWindowType type)
     if (impl) {
         callback = impl->get_core_event_callback();
         if (callback) {
-            sclboolean ret = false;
+            sclboolean ret = FALSE;
             callback->on_check_option_window_availability(&ret);
-            if (ret == false) {
+            if (ret == FALSE) {
                 LOGW("option_window not available\n");
                 return SCLWINDOW_INVALID;
             }
@@ -784,9 +786,9 @@ bool CSCLCoreUIEFL::show_option_window(SCLOptionWindowType type)
     if (impl) {
         callback = impl->get_core_event_callback();
         if (callback) {
-            sclboolean ret = false;
+            sclboolean ret = FALSE;
             callback->on_check_option_window_availability(&ret);
-            if (ret == false) {
+            if (ret == FALSE) {
                 LOGW("option_window not available\n");
                 return false;
             }
@@ -864,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;