Commit 333c5bd9 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

ime: Do not send WM_IME_ENDCOMPOSITION on CPS_COMPLETE if there is no composition.

parent 6b88529b
...@@ -839,6 +839,7 @@ BOOL WINAPI NotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue) ...@@ -839,6 +839,7 @@ BOOL WINAPI NotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue)
cpstr = (LPWSTR)&cdata[cs->dwCompStrOffset]; cpstr = (LPWSTR)&cdata[cs->dwCompStrOffset];
ImmUnlockIMCC(lpIMC->hCompStr); ImmUnlockIMCC(lpIMC->hCompStr);
} }
myPrivate = ImmLockIMCC(lpIMC->hPrivate);
if (cplen > 0) if (cplen > 0)
{ {
WCHAR param = cpstr[0]; WCHAR param = cpstr[0];
...@@ -855,11 +856,13 @@ BOOL WINAPI NotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue) ...@@ -855,11 +856,13 @@ BOOL WINAPI NotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue)
GenerateIMEMessage(hIMC, WM_IME_COMPOSITION, param, GenerateIMEMessage(hIMC, WM_IME_COMPOSITION, param,
GCS_RESULTSTR | GCS_RESULTCLAUSE); GCS_RESULTSTR | GCS_RESULTCLAUSE);
GenerateIMEMessage(hIMC, WM_IME_ENDCOMPOSITION, 0, 0);
} }
else if (myPrivate->bInComposition)
GenerateIMEMessage(hIMC, WM_IME_ENDCOMPOSITION, 0, 0);
GenerateIMEMessage(hIMC, WM_IME_ENDCOMPOSITION, 0, 0);
myPrivate = ImmLockIMCC(lpIMC->hPrivate);
myPrivate->bInComposition = FALSE; myPrivate->bInComposition = FALSE;
ImmUnlockIMCC(lpIMC->hPrivate); ImmUnlockIMCC(lpIMC->hPrivate);
......
...@@ -763,6 +763,7 @@ BOOL WINAPI NotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue) ...@@ -763,6 +763,7 @@ BOOL WINAPI NotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue)
cpstr = (LPWSTR)&(cdata[cs->dwCompStrOffset]); cpstr = (LPWSTR)&(cdata[cs->dwCompStrOffset]);
ImmUnlockIMCC(lpIMC->hCompStr); ImmUnlockIMCC(lpIMC->hCompStr);
} }
myPrivate = ImmLockIMCC(lpIMC->hPrivate);
if (cplen > 0) if (cplen > 0)
{ {
WCHAR param = cpstr[0]; WCHAR param = cpstr[0];
...@@ -779,11 +780,12 @@ BOOL WINAPI NotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue) ...@@ -779,11 +780,12 @@ BOOL WINAPI NotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue)
GenerateIMEMessage(hIMC, WM_IME_COMPOSITION, param, GenerateIMEMessage(hIMC, WM_IME_COMPOSITION, param,
GCS_RESULTSTR|GCS_RESULTCLAUSE); GCS_RESULTSTR|GCS_RESULTCLAUSE);
}
GenerateIMEMessage(hIMC,WM_IME_ENDCOMPOSITION, 0, 0); GenerateIMEMessage(hIMC,WM_IME_ENDCOMPOSITION, 0, 0);
}
else if (myPrivate->bInComposition)
GenerateIMEMessage(hIMC,WM_IME_ENDCOMPOSITION, 0, 0);
myPrivate = ImmLockIMCC(lpIMC->hPrivate);
myPrivate->bInComposition = FALSE; myPrivate->bInComposition = FALSE;
ImmUnlockIMCC(lpIMC->hPrivate); ImmUnlockIMCC(lpIMC->hPrivate);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment