Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion macosfrontend/macosfrontend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,14 @@ void MacosFrontend::focusIn(ICUUID uuid, bool isPassword) {
auto program = ic->program();
FCITX_INFO() << "Focus in " << program;
if (!program.empty()) {
useAppDefaultIM(program);
// Focusing on another input field in the same app shouldn't activate
// default IM.
if (program != lastFocusedApp_) {
useAppDefaultIM(program);
}
useVimMode(program, ic);
Comment thread
eagleoflqj marked this conversation as resolved.
}
lastFocusedApp_ = program;
}

std::string MacosFrontend::commitComposition(ICUUID uuid) {
Expand Down
1 change: 1 addition & 0 deletions macosfrontend/macosfrontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ class MacosFrontend : public AddonInstance {
eventHandlers_;
std::string statusItemText;
std::unordered_map<std::string, std::string> appDefaultIMCache_;
std::string lastFocusedApp_;
void updateStatusItemText();

inline MacosInputContext *findIC(ICUUID);
Expand Down
Loading