static string g_default_punctuation[MAX_DEFAULT_PUNCTUATION] = {"-", "@", "'", "!", "?", ","};
static string g_current_punctuation[MAX_DEFAULT_PUNCTUATION-1] = {"RCENT1", "RCENT2", "RCENT3", "RCENT4", "RCENT5"};
static vector<string> g_softcandidate_string;
-static bool g_softcandidate_show = false;
static bool g_input_panel_show = false;
static bool g_caps_mode_pending = false;
static bool g_floating_mode = false;
Candidate *candidate = get_candidate();
if (candidate) {
candidate->hide();
- g_softcandidate_show = false;
}
return ECORE_CALLBACK_CANCEL;
}
if (keyboard_state->layout == ISE_LAYOUT_STYLE_NUMBER) {
ime_send_key_event(IME_KEY_Print, IME_KEY_MASK_CONTROL, false);
} else {
- if (word_timer == NULL && (!get_candidate() || !g_softcandidate_show)) {
+ Candidate *candidate = get_candidate();
+ if (word_timer == NULL && (!candidate || !candidate->get_visible())) {
word_timer = ecore_timer_add(MULTITAP_TIMEOUT, _multi_tap_timer_cb, NULL);
}
ime_send_key_event(IME_KEY_Select, IME_KEY_MASK_CONTROL, false);
Candidate *candidate = get_candidate();
if (candidate) {
candidate->rotate(degree);
- if (g_softcandidate_show) {
+ if (candidate->get_visible()) {
candidate->update(g_softcandidate_string);
}
}
}
g_input_panel_show = false;
- if (g_softcandidate_show && get_candidate())
+ Candidate *candidate = get_candidate();
+ if (candidate && candidate->get_visible())
set_ime_size(g_floating_mode, ISE_CANDIDATE_REQ_SHOW);
#ifdef _WEARABLE
hide_indicator_window();
create_softcandidate();
if (g_candidate && g_candidate->get_visible()) {
- g_softcandidate_show = true;
g_candidate->show();
set_ime_size(g_floating_mode, ISE_CANDIDATE_REQ_SHOW);
return;
ise_app_candidate_show()
{
#ifdef _WEARABLE
- if (!g_softcandidate_show) {
+ if (!g_candidate)
+ return;
+
+ if (!g_candidate->get_visible())
return;
- }
#endif
LOGD("Enter\n");
delete_softcandidate_hide_timer();
create_softcandidate();
- g_softcandidate_show = true;
Candidate *candidate = get_candidate();
if (candidate) {
candidate->show();
LOGD("Enter\n");
Candidate *candidate = get_candidate();
- if (!candidate || !g_softcandidate_show) {
+ if (!candidate || !candidate->get_visible()) {
LOGD("No candidate\n");
return;
}
keyboard_state->layout == ISE_LAYOUT_STYLE_PASSWORD) {
ise_app_candidate_hide();
} else {
- g_softcandidate_show = true;
ise_app_candidate_show();
}
}
void ise_update_table(const vector<string> &vec_str)
{
- if (!get_candidate() || !g_softcandidate_show) {
+ Candidate *candidate = get_candidate();
+ if (!candidate || !candidate->get_visible()) {
create_softcandidate();
}
- Candidate *candidate = get_candidate();
+ candidate = get_candidate();
if (candidate) {
candidate->update(vec_str);
}
LOGD("Enter\n");
ise_focus_in(context_id);
Candidate *candidate = get_candidate();
- if (input_smartreply_get_reply_num() == 0 && g_softcandidate_show) {
- if (candidate) {
+ if (input_smartreply_get_reply_num() == 0) {
+ if (candidate && candidate->get_visible()) {
ise_app_candidate_hide();
candidate->hide();
}