A multilingual input method framework
Revision | 6bcd2a4a2e2a1e437ee46a136bf126e5c661b9cb (tree) |
---|---|
Time | 2005-09-02 15:03:41 |
Author | ekato <ekato@ff9a...> |
Commiter | ekato |
* xim/ : Port changes in r1381 from trunk.
@@ -389,22 +389,7 @@ void XimIC::setFocus() | ||
389 | 389 | |
390 | 390 | current_ic = this; |
391 | 391 | mIsActive = true; |
392 | - | |
393 | - bool is_candwin_active = m_kkContext->hasActiveCandwin(); | |
394 | - | |
395 | - if (mConvdisp && is_candwin_active == false) { | |
396 | - // unset_focus before move_candwin in m_kkContext->focusIn() | |
397 | - mConvdisp->unset_focus(); | |
398 | - } | |
399 | - | |
400 | 392 | m_kkContext->focusIn(); |
401 | - | |
402 | - if (mConvdisp && is_candwin_active == true) { | |
403 | - // Updating preedit here causes string mismatch if the context | |
404 | - // receives XIM_RESET_IC after XIM_SET_IC_FOCUS. Should only | |
405 | - // update candidate window. | |
406 | - m_kkContext->candidate_update(); | |
407 | - } | |
408 | 393 | } |
409 | 394 | |
410 | 395 | // Note that the sequence of XIM_SET_IC_FOCUS and XIM_UNSET_FOCUS |
@@ -440,11 +440,14 @@ InputContext::focusIn() | ||
440 | 440 | uim_helper_client_focus_in(mUc); |
441 | 441 | mFocusedContext = this; |
442 | 442 | if (mConvdisp) { |
443 | + mConvdisp->unset_focus(); | |
443 | 444 | mConvdisp->move_candwin(); |
444 | 445 | mConvdisp->update_caret_state(); |
445 | 446 | } |
446 | 447 | uim_prop_list_update(mUc); |
447 | 448 | uim_prop_label_update(mUc); |
449 | + if (hasActiveCandwin()) | |
450 | + candidate_update(); | |
448 | 451 | } |
449 | 452 | |
450 | 453 | void |