From 3a4d7eb85a65ac870eebc86e4929c21c2eb3a051 Mon Sep 17 00:00:00 2001 From: Takuro Ashie Date: Fri, 15 Apr 2022 13:12:39 +0900 Subject: [PATCH] Win32: Use ImmGetCompositionStringW() explicitly ImmGetCompositionString() is ambiguous. --- src/win32_window.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/win32_window.c b/src/win32_window.c index 891e8f70..1517c7b5 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -852,8 +852,8 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM l HIMC hIMC = ImmGetContext(hWnd); // get preedit data sizes LONG preeditTextLength = ImmGetCompositionStringW(hIMC, GCS_COMPSTR, NULL, 0); - LONG attrLength = ImmGetCompositionString(hIMC, GCS_COMPATTR, NULL, 0); - LONG clauseLength = ImmGetCompositionString(hIMC, GCS_COMPCLAUSE, NULL, 0); + LONG attrLength = ImmGetCompositionStringW(hIMC, GCS_COMPATTR, NULL, 0); + LONG clauseLength = ImmGetCompositionStringW(hIMC, GCS_COMPCLAUSE, NULL, 0); if (preeditTextLength > 0) { @@ -868,8 +868,8 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM l // get preedit data ImmGetCompositionStringW(hIMC, GCS_COMPSTR, buffer, preeditTextLength); - ImmGetCompositionString(hIMC, GCS_COMPATTR, attributes, attrLength); - ImmGetCompositionString(hIMC, GCS_COMPCLAUSE, clauses, clauseLength); + ImmGetCompositionStringW(hIMC, GCS_COMPATTR, attributes, attrLength); + ImmGetCompositionStringW(hIMC, GCS_COMPCLAUSE, clauses, clauseLength); // store preedit text while (ctext < length + 1)