Skip to content

Commit ea49aa1

Browse files
authored
fix(tsf): ime status (#1499)
1 parent d75b34b commit ea49aa1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

WeaselTSF/Compartment.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,7 @@ HRESULT WeaselTSF::_HandleCompartment(REFGUID guidCompartment) {
253253
_EnableLanguageBar(isOpen);
254254
_UpdateLanguageBar(_status);
255255
} else {
256-
_status.ascii_mode = !_status.ascii_mode;
257-
_SetKeyboardOpen(true);
256+
_status.ascii_mode = !_IsKeyboardOpen();
258257
if (_pLangBarButton && _pLangBarButton->IsLangBarDisabled())
259258
_EnableLanguageBar(true);
260259
_HandleLangBarMenuSelect(_status.ascii_mode

WeaselTSF/LanguageBar.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,11 @@ void WeaselTSF::_UpdateLanguageBar(weasel::Status stat) {
416416
else
417417
flags &= (~TF_CONVERSIONMODE_FULLSHAPE);
418418
_SetCompartmentDWORD(flags, GUID_COMPARTMENT_KEYBOARD_INPUTMODE_CONVERSION);
419-
419+
if (!_isToOpenClose) {
420+
BOOL open = !stat.ascii_mode;
421+
if (_IsKeyboardOpen() != open)
422+
_SetKeyboardOpen(open);
423+
}
420424
_pLangBarButton->UpdateWeaselStatus(stat);
421425
}
422426

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy