Skip to content

Commit

Permalink
Fixed input method candidate box on Windows 11
Browse files Browse the repository at this point in the history
  • Loading branch information
FangCunWuChang committed Nov 30, 2024
1 parent 5179f4e commit a9e084d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/juce_gui_basics/native/juce_Windowing_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4298,8 +4298,14 @@ class HWNDComponentPeer final : public ComponentPeer

case WM_IME_SETCONTEXT:
imeHandler.handleSetContext (h, wParam == TRUE);

lParam &= ~(LPARAM) ISC_SHOWUICOMPOSITIONWINDOW;
return ImmIsUIMessage (h, message, wParam, lParam);
// On Windows 11, directly returning from this function
// will cause the input method candidate box to not display correctly.
// The window's default message handler should be used
// to continue processing this message.
// Older version of the code is this: return ImmIsUIMessage (h, message, wParam, lParam);
break;

case WM_IME_STARTCOMPOSITION: imeHandler.handleStartComposition (*this); return 0;
case WM_IME_ENDCOMPOSITION: imeHandler.handleEndComposition (*this, h); return 0;
Expand Down

0 comments on commit a9e084d

Please sign in to comment.