Avoid activating Windows TSF during dictation start#516
Closed
aimod-cc wants to merge 1 commit into
Closed
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
This avoids activating the OpenLess TSF IME when a dictation session starts.
On Windows, starting dictation previously called
prepare_session(), which can activate the OpenLess TSF profile and cause host processes such as Explorer to loadOpenLessIme.dll. In some cases Explorer crashes withntdll.dll/0xc0000374around dictation start.The default Windows insertion path already supports paced Unicode
SendInput, so this change skips TSF activation when non-TSF insertion is enabled. TSF is now prepared lazily only when non-TSF fallback is disabled and TSF insertion is explicitly required.Verified with:
npm run buildcargo checkgit diff --checkPR Type
Bug fix
Description
Skip TSF activation at dictation start
Use non-TSF insertion immediately
Lazily prepare TSF only when needed
Adjust Windows IME logging and helpers
Diagram Walkthrough
File Walkthrough
coordinator.rs
Defer Windows TSF preparation until neededopenless-all/app/src-tauri/src/coordinator.rs
prepare_session()only for required TSF inserts.dictation.rs
Stop preparing TSF on session beginopenless-all/app/src-tauri/src/coordinator/dictation.rs
begin_session().