Skip to content

Commit

Permalink
Update Compartment.cpp
Browse files Browse the repository at this point in the history
clear composition when close keyboard
  • Loading branch information
fxliang authored and lotem committed Feb 24, 2024
1 parent bd21d24 commit c1fd5aa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions WeaselTSF/Compartment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,11 @@ HRESULT WeaselTSF::_HandleCompartment(REFGUID guidCompartment)
if (IsEqualGUID(guidCompartment, GUID_COMPARTMENT_KEYBOARD_OPENCLOSE))
{
BOOL isOpen = _IsKeyboardOpen();
// clear composition when close keyboard
if (!isOpen && _pEditSessionContext) {
m_client.ClearComposition();
_EndComposition(_pEditSessionContext, true);
}
_EnableLanguageBar(isOpen);
}
else if (IsEqualGUID(guidCompartment, GUID_COMPARTMENT_KEYBOARD_INPUTMODE_CONVERSION))
Expand Down

0 comments on commit c1fd5aa

Please sign in to comment.