summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2022-04-04 20:12:36 +0800
committerAndras Timar <andras.timar@collabora.com>2022-04-14 14:02:11 +0200
commit255de49a7a38d1d64d4e4d6c82cf26f05b3d0e9f (patch)
treeb4bfc2dde3801feaeb149559991eae8986eec9e0 /vcl
parent5e046e3a9ebc95792c1c54cf91f520ece6339c6e (diff)
tdf#143447 ignore IME candidate window state.
Some traditional Chinese IMEs ( Input Method Editors ) under Windows10 send WM_IME_NOTIFY with IMN_OPENCANDIDATE but not IMN_CLOSECANDIDATE. The behavior is different if users configure the IME and enable "legacy" option. That caused the cursor been hidden, misled by mbCandidateMode. The patch ignores the candidate window mode in case the length of the composition string is 0, assume in that case candidate window is useless, and resets the candidate window mode when composition ended to maintain the state as much as we can. Change-Id: I91a1c23ee1a031313243e032653f50f39b0f2a3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132512 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com> (cherry picked from commit 2b2d1c08c94fdc3982971c2b19ea241f05e578c9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132858 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/win/window/salframe.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 6593b2fbebb6..4556c850edec 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -5079,7 +5079,7 @@ static bool ImplHandleIMECompositionInput( WinSalFrame* pFrame,
if ( (nTextLen > 0) || !(lParam & GCS_RESULTSTR) )
{
// End the mode, if the last character is deleted
- if ( !nTextLen && !pFrame->mbCandidateMode )
+ if ( !nTextLen )
{
pFrame->CallCallback( SalEvent::ExtTextInput, &aEvt );
pFrame->CallCallback( SalEvent::EndExtTextInput, nullptr );
@@ -5164,7 +5164,10 @@ static bool ImplHandleIMEEndComposition( HWND hWnd )
if ( pFrame && pFrame->mbHandleIME )
{
if ( pFrame->mbAtCursorIME )
+ {
+ pFrame->mbCandidateMode = false;
bDef = false;
+ }
}
ImplSalYieldMutexRelease();