Fix ImmControl implementation

This commit is contained in:
Marek Roszko 2023-05-09 21:27:14 -04:00
parent 5d93487607
commit 6e93a0cbad
1 changed files with 3 additions and 11 deletions

View File

@ -160,20 +160,12 @@ void KIPLATFORM::UI::WarpPointer( wxWindow* aWindow, int aX, int aY )
void KIPLATFORM::UI::ImmControl( wxWindow* aWindow, bool aEnable )
{
static HIMC origHIMC = (HIMC) 0;
if ( !aEnable )
{
if( origHIMC == (HIMC) 0 )
{
origHIMC = ImmGetContext( aWindow->GetHWND() );
if( origHIMC )
ImmAssociateContext( aWindow->GetHWND(), NULL );
}
ImmAssociateContext( aWindow->GetHWND(), NULL );
}
else if( origHIMC != (HIMC) 0 )
else
{
ImmAssociateContext( aWindow->GetHWND(), origHIMC );
origHIMC = (HIMC) 0;
ImmAssociateContextEx( aWindow->GetHWND(), 0, IACE_DEFAULT );
}
}