mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-19 02:43:19 +00:00
imm32: Hide the composition window if the string is empty.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55258
This commit is contained in:
parent
1b26b17e05
commit
428120441b
|
@ -98,6 +98,8 @@ static void input_context_set_comp_str( INPUTCONTEXT *ctx, const WCHAR *str, UIN
|
||||||
UINT size;
|
UINT size;
|
||||||
BYTE *dst;
|
BYTE *dst;
|
||||||
|
|
||||||
|
TRACE( "ctx %p, str %s\n", ctx, debugstr_wn( str, len ) );
|
||||||
|
|
||||||
size = sizeof(*compstr);
|
size = sizeof(*compstr);
|
||||||
size += len * sizeof(WCHAR); /* GCS_COMPSTR */
|
size += len * sizeof(WCHAR); /* GCS_COMPSTR */
|
||||||
size += len; /* GCS_COMPSTRATTR */
|
size += len; /* GCS_COMPSTRATTR */
|
||||||
|
@ -310,20 +312,17 @@ static void ime_ui_paint( HIMC himc, HWND hwnd )
|
||||||
|
|
||||||
static void ime_ui_update_window( INPUTCONTEXT *ctx, HWND hwnd )
|
static void ime_ui_update_window( INPUTCONTEXT *ctx, HWND hwnd )
|
||||||
{
|
{
|
||||||
COMPOSITIONSTRING *string;
|
WCHAR *str;
|
||||||
|
UINT len;
|
||||||
|
|
||||||
if (ctx->hCompStr) string = ImmLockIMCC( ctx->hCompStr );
|
if (!(str = input_context_get_comp_str( ctx, FALSE, &len )) || !*str)
|
||||||
else string = NULL;
|
|
||||||
|
|
||||||
if (!string || string->dwCompStrLen == 0)
|
|
||||||
ShowWindow( hwnd, SW_HIDE );
|
ShowWindow( hwnd, SW_HIDE );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ShowWindow( hwnd, SW_SHOWNOACTIVATE );
|
ShowWindow( hwnd, SW_SHOWNOACTIVATE );
|
||||||
RedrawWindow( hwnd, NULL, NULL, RDW_ERASENOW | RDW_INVALIDATE );
|
RedrawWindow( hwnd, NULL, NULL, RDW_ERASENOW | RDW_INVALIDATE );
|
||||||
}
|
}
|
||||||
|
free( str );
|
||||||
if (string) ImmUnlockIMCC( ctx->hCompStr );
|
|
||||||
|
|
||||||
ctx->hWnd = GetFocus();
|
ctx->hWnd = GetFocus();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue