#include <string.h>
#include <unistd.h>
#include <sys/time.h>
+#include <Ecore_IMF.h>
#include "scim_private.h"
#include "scim.h"
void
HelperAgent::update_input_context (uint32 type, uint32 value) const
{
- /* Update all state variables that could be queried by the client application */
- char *buf = NULL;
- m_impl->signal_get_language_locale(this, -1, &buf);
-
- if (buf != NULL) {
- if (m_impl->socket_active.is_connected()) {
- m_impl->send.clear();
- m_impl->send.put_command(SCIM_TRANS_CMD_REQUEST);
- m_impl->send.put_data(m_impl->magic_active);
- m_impl->send.put_command(ISM_TRANS_CMD_UPDATE_ISE_LANGUAGE_LOCALE);
- m_impl->send.put_data(buf, strlen(buf));
- m_impl->send.write_to_socket(m_impl->socket_active, m_impl->magic_active);
- }
- free(buf);
- buf = NULL;
+ if (type == ECORE_IMF_INPUT_PANEL_LANGUAGE_EVENT) {
+ /* Update all state variables that could be queried by the client application */
+ char *buf = NULL;
+ m_impl->signal_get_language_locale(this, -1, &buf);
+
+ if (buf != NULL) {
+ if (m_impl->socket_active.is_connected()) {
+ m_impl->send.clear();
+ m_impl->send.put_command(SCIM_TRANS_CMD_REQUEST);
+ m_impl->send.put_data(m_impl->magic_active);
+ m_impl->send.put_command(ISM_TRANS_CMD_UPDATE_ISE_LANGUAGE_LOCALE);
+ m_impl->send.put_data(buf, strlen(buf));
+ m_impl->send.write_to_socket(m_impl->socket_active, m_impl->magic_active);
+ }
+ free(buf);
+ buf = NULL;
+ }
}
if (m_impl->socket_active.is_connected ()) {