static bool is_server_started = false;
static engine_loader_dbus_info_s *dbus_info = NULL;
+static ISELanguageManager _language_manager;
static void _server_appeared_cb(GDBusConnection *connection, const gchar *name, const gchar *name_owner, gpointer user_data)
{
{
LOGD("own_name : %s, signal_name : %s", g_dbus_connection_get_unique_name(connection), signal_name);
+ const sclchar *cur_lang = _language_manager.get_current_language();
+ if (cur_lang) {
+ LANGUAGE_INFO *info = _language_manager.get_language_info(cur_lang);
+ if (info && info->load_in_ime)
+ return;
+ }
+
if (g_strcmp0(signal_name, "show_preedit_string") == 0) {
int ret = ime_show_preedit_string();
if (ret != IME_ERROR_NONE)
g_ui->set_shift_state(mode ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF);
g_ui->set_autocapital_shift_state(!mode);
- engine_loader_send_imengine_event(mode ? MVK_Shift_On : MVK_Shift_Off, 0);
+ bool load_in_ime = false;
+ const sclchar *cur_lang = _language_manager.get_current_language();
+ if (cur_lang) {
+ LANGUAGE_INFO *info = _language_manager.get_language_info(cur_lang);
+ if (info)
+ load_in_ime = info->load_in_ime;
+ }
+
+ if (load_in_ime)
+ ime_send_imengine_event(mode ? MVK_Shift_On : MVK_Shift_Off, 0);
+ else
+ engine_loader_send_imengine_event(mode ? MVK_Shift_On : MVK_Shift_Off, 0);
}
}
}
g_need_send_shift_event = TRUE;
//ise_send_event (MVK_Shift_Lock, KEY_MASK_NULL);
} else if (strncmp(event_desc.key_value, caps_lock, strlen(caps_lock)) == 0) {
+ bool load_in_ime = false;
+ const sclchar *cur_lang = _language_manager.get_current_language();
+ if (cur_lang) {
+ LANGUAGE_INFO *info = _language_manager.get_language_info(cur_lang);
+ if (info)
+ load_in_ime = info->load_in_ime;
+ }
+
if (g_ui->get_shift_state() != SCL_SHIFT_STATE_LOCK) {
g_ui->set_shift_state(SCL_SHIFT_STATE_LOCK);
- engine_loader_send_imengine_event(MVK_Shift_Lock, 0);
+ if (load_in_ime)
+ ime_send_imengine_event(MVK_Shift_Lock, 0);
+ else
+ engine_loader_send_imengine_event(MVK_Shift_Lock, 0);
} else {
g_ui->set_shift_state(SCL_SHIFT_STATE_OFF);
- engine_loader_send_imengine_event(MVK_Shift_Off, 0);
+ if (load_in_ime)
+ ime_send_imengine_event(MVK_Shift_Off, 0);
+ else
+ engine_loader_send_imengine_event(MVK_Shift_Off, 0);
}
//g_need_send_shift_event = TRUE;
} else if (strncmp(event_desc.key_value, delete_all, strlen(delete_all)) == 0) {
ret = pkgmgrinfo_appinfo_get_pkgid(handle, &pkgid);
if (ret == PMINFO_R_OK) {
if (table[loop].load_in_ime) {
- engine_loader_set_imengine(DEFAULT_KEYBOARD_ISE_UUID, DEFAULT_KEYBOARD_ISE_PKGID);
+ ime_hide_lookup_table();
ime_set_engine_loader_flag(false);
ime_set_imengine(table[loop].keyboard_ise_uuid);
}