Added call for on_show callback 00/92800/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Tue, 18 Oct 2016 14:50:13 +0000 (23:50 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Tue, 18 Oct 2016 14:54:21 +0000 (23:54 +0900)
Change-Id: Ia97f51e53ec5043072eaed184c890ee4ae3f1c51

src/legacy_support/websocket.cpp
src/sclconnection-isf.cpp
src/sclcoreui-efl.cpp
src/sclcoreui-efl.h

index 59f00c3..aa82219 100644 (file)
@@ -960,14 +960,19 @@ void CWebHelperAgentWebSocket::handle_recved_message(ISE_MESSAGE &message)
         }
     } else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_SET_KEYBOARD_SIZES]) == 0) {
         LOGD("ISE_MESSAGE_COMMAND_SET_KEYBOARD_SIZES");
-        if (message.values.size() == 4) {
-            int portrait_width, portrait_height;
-            int landscape_width, landscape_height;
+        int portrait_width, portrait_height;
+        int landscape_width, landscape_height;
 
+        if (message.values.size() == 4 || message.values.size() == 2) {
             portrait_width = atoi(message.values.at(0).c_str());
             portrait_height = atoi(message.values.at(1).c_str());
-            landscape_width = atoi(message.values.at(2).c_str());
-            landscape_height = atoi(message.values.at(3).c_str());
+            if (message.values.size() == 2) {
+                landscape_width = portrait_width;
+                landscape_height = portrait_height;
+            } else {
+                landscape_width = atoi(message.values.at(2).c_str());
+                landscape_height = atoi(message.values.at(3).c_str());
+            }
 
             LOGD("ISE_MESSAGE_COMMAND_SET_KEYBOARD_SIZES : %d %d %d %d",
                 portrait_width, portrait_height, landscape_width, landscape_height);
index bc7a365..b0c0357 100644 (file)
 #include <Elementary.h>
 #include <dlog.h>
 
+#ifdef WEBSOCKET
+#include "legacy_support/websocket.h"
+extern CWebHelperAgentWebSocket g_websocket;
+#endif
+
 using namespace scl;
 
 static scim::ConfigPointer _scim_config(0);
@@ -169,6 +174,10 @@ static void slot_ise_show(const scim::HelperAgent *agent, int ic, char *buf, siz
             if (ui) {
                 ui->process_keyboard_ui_state_change(KEYBOARD_UI_STATE_DID_SHOW);
             }
+
+#ifdef WEBSOCKET
+            g_websocket.on_show(ic);
+#endif
         }
     }
 }
@@ -186,6 +195,10 @@ static void slot_ise_hide(const scim::HelperAgent *agent, int ic, const scim::St
             if (ui) {
                 ui->process_keyboard_ui_state_change(KEYBOARD_UI_STATE_DID_HIDE);
             }
+
+#ifdef WEBSOCKET
+            g_websocket.on_hide(ic);
+#endif
         }
     }
 }
index f56834e..99a4728 100644 (file)
 #include <X11/Xatom.h>
 #endif
 
+#ifdef WEBSOCKET
+ /* This websocket agent is for supporting Tizen 2.X legacy web IMEs that uses websocket */
+CWebHelperAgentWebSocket g_websocket;
+#endif
+
 #ifdef WAYLAND
 struct WaylandKeyboard
 {
@@ -85,7 +90,7 @@ sclboolean CSCLCoreUIEFL::init()
     }
 
 #ifdef WEBSOCKET
-    m_websocket.init();
+    g_websocket.init();
 #endif
 
     return TRUE;
@@ -96,7 +101,7 @@ void CSCLCoreUIEFL::fini()
     m_initialized = FALSE;
 
 #ifdef WEBSOCKET
-    m_websocket.exit();
+    g_websocket.exit();
 #endif
 }
 
index 5a383f7..ee0e9f7 100644 (file)
@@ -62,11 +62,6 @@ private:
     sclwindow m_main_window;
 
     OptionWindowInfo m_option_window_info[OPTION_WINDOW_TYPE_MAX];
-
-#ifdef WEBSOCKET
-    /* This websocket agent is for supporting Tizen 2.X legacy web IMEs that uses websocket */
-    CWebHelperAgentWebSocket m_websocket;
-#endif
 };
 
 }