if (!check_serial(imcontext, serial))
return;
- if (old_preedit)
- {
+ if (old_preedit) {
ecore_imf_context_preedit_end_event_add(imcontext->ctx);
ecore_imf_context_event_callback_call(imcontext->ctx,
ECORE_IMF_CALLBACK_PREEDIT_END,
ecore_imf_context_event_callback_call(imcontext->ctx,
ECORE_IMF_CALLBACK_PREEDIT_END, NULL);
- ecore_imf_context_commit_event_add(imcontext->ctx,
- imcontext->preedit_commit);
- ecore_imf_context_event_callback_call(imcontext->ctx,
- ECORE_IMF_CALLBACK_COMMIT,
- (void *)imcontext->preedit_commit);
+ if (strlen(imcontext->preedit_commit) > 0) {
+ ecore_imf_context_commit_event_add(imcontext->ctx,
+ imcontext->preedit_commit);
+ ecore_imf_context_event_callback_call(imcontext->ctx,
+ ECORE_IMF_CALLBACK_COMMIT,
+ (void *)imcontext->preedit_commit);
+ }
}
static void