imm32: If composition string is reduced to 0 characters hide composition window.
This commit is contained in:
parent
a72e182010
commit
ede59b0c05
|
@ -74,7 +74,7 @@ static UINT WM_MSIME_DOCUMENTFEED;
|
||||||
*/
|
*/
|
||||||
static LRESULT WINAPI IME_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
|
static LRESULT WINAPI IME_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||||
LPARAM lParam);
|
LPARAM lParam);
|
||||||
static void UpdateDataInDefaultIMEWindow(HWND hwnd);
|
static void UpdateDataInDefaultIMEWindow(HWND hwnd, BOOL showable);
|
||||||
static void ImmInternalPostIMEMessage(UINT, WPARAM, LPARAM);
|
static void ImmInternalPostIMEMessage(UINT, WPARAM, LPARAM);
|
||||||
static void ImmInternalSetOpenStatus(BOOL fOpen);
|
static void ImmInternalSetOpenStatus(BOOL fOpen);
|
||||||
static HIMCC updateResultStr(HIMCC old, LPWSTR resultstr, DWORD len);
|
static HIMCC updateResultStr(HIMCC old, LPWSTR resultstr, DWORD len);
|
||||||
|
@ -1672,7 +1672,7 @@ BOOL WINAPI ImmSetCompositionStringW(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateDataInDefaultIMEWindow(hwndDefault);
|
UpdateDataInDefaultIMEWindow(hwndDefault,FALSE);
|
||||||
|
|
||||||
ImmInternalPostIMEMessage(WM_IME_COMPOSITION, wParam, flags);
|
ImmInternalPostIMEMessage(WM_IME_COMPOSITION, wParam, flags);
|
||||||
|
|
||||||
|
@ -2033,9 +2033,24 @@ static void PaintDefaultIMEWnd(HWND hwnd)
|
||||||
EndPaint(hwnd,&ps);
|
EndPaint(hwnd,&ps);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void UpdateDataInDefaultIMEWindow(HWND hwnd)
|
static void UpdateDataInDefaultIMEWindow(HWND hwnd, BOOL showable)
|
||||||
{
|
{
|
||||||
|
LPCOMPOSITIONSTRING compstr;
|
||||||
|
|
||||||
|
if (root_context->IMC.hCompStr)
|
||||||
|
compstr = ImmLockIMCC(root_context->IMC.hCompStr);
|
||||||
|
else
|
||||||
|
compstr = NULL;
|
||||||
|
|
||||||
|
if (compstr == NULL || compstr->dwCompStrLen == 0)
|
||||||
|
ShowWindow(hwndDefault,SW_HIDE);
|
||||||
|
else if (showable)
|
||||||
|
ShowWindow(hwndDefault,SW_SHOWNOACTIVATE);
|
||||||
|
|
||||||
RedrawWindow(hwnd,NULL,NULL,RDW_ERASENOW|RDW_INVALIDATE);
|
RedrawWindow(hwnd,NULL,NULL,RDW_ERASENOW|RDW_INVALIDATE);
|
||||||
|
|
||||||
|
if (compstr != NULL)
|
||||||
|
ImmUnlockIMCC(root_context->IMC.hCompStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2075,7 +2090,7 @@ static LRESULT WINAPI IME_WindowProc(HWND hwnd, UINT msg, WPARAM wParam,
|
||||||
if (lParam & GCS_RESULTSTR)
|
if (lParam & GCS_RESULTSTR)
|
||||||
IMM_PostResult(root_context);
|
IMM_PostResult(root_context);
|
||||||
else
|
else
|
||||||
UpdateDataInDefaultIMEWindow(hwnd);
|
UpdateDataInDefaultIMEWindow(hwnd,TRUE);
|
||||||
break;
|
break;
|
||||||
case WM_IME_STARTCOMPOSITION:
|
case WM_IME_STARTCOMPOSITION:
|
||||||
TRACE("IME message %s, 0x%x, 0x%x\n",
|
TRACE("IME message %s, 0x%x, 0x%x\n",
|
||||||
|
|
Loading…
Reference in New Issue