Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determine whether the obtained IC is the currently active IC, and then determine whether the engine needs to be inactivated #1124

Closed
wants to merge 1 commit into from

Conversation

hantengc
Copy link
Contributor

  1. In most cases, focus out should be called first, and then focus in.
  2. Before the input method engine deactivates, determine whether the obtained IC is the currently activated IC, and then decide whether to inactivate the engine. If it is not the currently activated IC, it does not need to deactivate the engine to avoid the inactivation of the input method engine

…n determine whether the engine needs to be inactivated

1. In most cases, focus out should be called first, and then focus in.
2. Before the input method engine deactivates, determine whether the obtained IC is the currently activated IC, and then decide whether to inactivate the engine. If it is not the currently activated IC, it does not need to deactivate the engine to avoid the inactivation of the input method engine
@hantengc
Copy link
Contributor Author

@hantengc @csslayer 老k,这个pr就是我想的解决不同的focus group过来foucs避免引擎deactivate的办法 可行不?

@wengxt
Copy link
Member

wengxt commented Aug 27, 2024

我已经解释过了,每个 focus group 都可以有 active ic

@wengxt wengxt closed this Aug 27, 2024
@hantengc
Copy link
Contributor Author

@wengxt 但是没有必要每次都通知引擎激活和失活吧?只有引擎失活的ic和激活的ic一致的时候,才认为引擎需要真正的失活

@wengxt
Copy link
Member

wengxt commented Aug 28, 2024

@hantengc deactivate是为了重置状态。事实上,你担心的部分一般都在界面那里处理

@hantengc
Copy link
Contributor Author

@wengxt 其实deactivate的时候不只是ui的处理,输入法的引擎重置也是在deactivate函数里面完成的。如果不增加这个判断,那所有的输入法插件需要在deactivate的时候自行判断需要失活的ic是否和当前激活的ic一致。如果没有读懂输入法框架,其他输入法很可能遇到一样的问题。从输入法框架侧修改,则输入法只需要关心:只要有deactivate就是在告诉输入法需要进行引擎的失活和ui的隐藏

@wengxt
Copy link
Member

wengxt commented Aug 29, 2024

@hantengc 因为你错误的认为输入法引擎只有一个全局状态,实际上每个ic都应该保存
一个状态

@wengxt
Copy link
Member

wengxt commented Aug 29, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants