WSCContextISF *context_scim = wsc_ctx;
- if (!context_scim || !context_scim->impl)
+ if (!context_scim || !context_scim->impl || !text)
return;
char *conv_text = strdup (utf8_wcstombs (context_scim->impl->surrounding_text).c_str ());
if (_TV) {
if (context_scim->impl->input_resource != INPUT_RESOURCE_REMOTE) {
- String _text(text);
if (context_scim->impl->panel_layout == ECORE_IMF_INPUT_PANEL_LAYOUT_PASSWORD) {
- const unsigned char pw_char[5] = { 0xE2, 0x80, 0xA2, 0x2A, 0x00 }; // • U+2022 * U+002A
- if (_text.find_first_not_of((char *)pw_char) != String::npos) {
- g_info_manager->remoteinput_callback_surrounding_text (_text, context_scim->impl->cursor_pos);
- }
- else {
- String empty("");
- g_info_manager->remoteinput_callback_surrounding_text (empty, 0);
- }
+ g_info_manager->remoteinput_callback_surrounding_text (String (""), 0);
}
else {
- g_info_manager->remoteinput_callback_surrounding_text (_text, context_scim->impl->cursor_pos);
+ g_info_manager->remoteinput_callback_surrounding_text (String (text), context_scim->impl->cursor_pos);
}
- context_scim->impl->init_remote_surrounding_text = true;
}
}
- else {
- context_scim->impl->init_remote_surrounding_text = true;
- }
+ context_scim->impl->init_remote_surrounding_text = true;
}
free (conv_text);
}