WidgetComponent controls widgets through VirtualWindow, but VirtualWindow does not have HWND, so IME cannot be enabled.
The following workaround enables IME activation.
void FSlateEditableTextLayout::FTextInputMethodContext::CacheWindow()
{
if (!OwnerLayout)
{
return;
}
const TSharedRef<const SWidget> OwningSlateWidgetPtr = OwnerLayout->OwnerWidget->GetSlateWidget();
#if 0
CachedParentWindow = FSlateApplication::Get().FindWidgetWindow(OwningSlateWidgetPtr);
#else //workaround
TSharedPtr<SWindow> SlateWindow = FSlateApplication::Get().FindWidgetWindow(OwningSlateWidgetPtr);
if (SlateWindow->IsVirtualWindow())
{
SlateWindow = FSlateApplication::Get().GetActiveTopLevelRegularWindow();
}
CachedParentWindow = SlateWindow;
#endif
}
IME cannot be enabled
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-211575 in the post.
| 6 |
| Component | UE - Editor - UI Systems |
|---|---|
| Affects Versions | 5.2, 5.3 |
| Created | Apr 5, 2024 |
|---|---|
| Updated | Oct 10, 2024 |