-
Notifications
You must be signed in to change notification settings - Fork 372
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
Redesign Mozc to not rely on synchronous edit sessions in Windows #821
Comments
yukawa
changed the title
Resign Mozc for Windows to not rely on synchronous edit sessions
Redesign Mozc for Windows to not rely on synchronous edit sessions
Oct 15, 2023
yukawa
changed the title
Redesign Mozc for Windows to not rely on synchronous edit sessions
Redesign Mozc to not rely on synchronous edit sessions in Windows
Oct 15, 2023
hiroyuki-komatsu
pushed a commit
that referenced
this issue
Oct 16, 2023
This is a workaround for Microsoft Word's suddenly stopping accepting synchronous edit sessions after moving ruler UI. While MS Word's stack trace after entering the failure mode strongly implies that this is an unexpected behavior in Microsoft Word [1], realistically Mozc needs to work around this by avoiding synchronous edit sessions whenever possible as TSF team has recommended [2]. Also MS-IME in Windows 11 22H2 does use asynchronous edit sessions even from the key event handler unless "Use previous version of Microsoft IME" settings is enabled. This means that stopping relying on synchronous edit sessions in Mozc also benefits the general app compatibility. The problem is that redesigning edit session handling is a relatively big project [3]. As a quick workaround, this commit aims to address the main typing issue in MS Word by tweaking 'OnOutputReceivedImpl'. The following features remains to be unavailable in the failure mode. * Reconversion triggered from IMEs. * Undo-commit Closes #819 with known issues. [1]: #819 [2]: https://learn.microsoft.com/en-us/archive/blogs/tsfaware/rules-of-text-services [3]: #821 PiperOrigin-RevId: 573696936
coooooooozy
pushed a commit
to coooooooozy/mozc
that referenced
this issue
Nov 26, 2023
This is a workaround for Microsoft Word's suddenly stopping accepting synchronous edit sessions after moving ruler UI. While MS Word's stack trace after entering the failure mode strongly implies that this is an unexpected behavior in Microsoft Word [1], realistically Mozc needs to work around this by avoiding synchronous edit sessions whenever possible as TSF team has recommended [2]. Also MS-IME in Windows 11 22H2 does use asynchronous edit sessions even from the key event handler unless "Use previous version of Microsoft IME" settings is enabled. This means that stopping relying on synchronous edit sessions in Mozc also benefits the general app compatibility. The problem is that redesigning edit session handling is a relatively big project [3]. As a quick workaround, this commit aims to address the main typing issue in MS Word by tweaking 'OnOutputReceivedImpl'. The following features remains to be unavailable in the failure mode. * Reconversion triggered from IMEs. * Undo-commit Closes google#819 with known issues. [1]: google#819 [2]: https://learn.microsoft.com/en-us/archive/blogs/tsfaware/rules-of-text-services [3]: google#821 PiperOrigin-RevId: 573696936
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Spun off from
There are several places where Mozc requests synchronous edit sessions with explicitly setting
TF_ES_SYNC
. However, as discussed in #819, it'd be better to redesign Mozc to not rely on synchronous edit sessions for application compatibility reasons (perhaps solely because of Microsoft Word though).Environment
References
Rules of Text Services - TSF Aware
https://learn.microsoft.com/en-us/archive/blogs/tsfaware/rules-of-text-services
Luckily, C++ has become much more powerful since the original article was written 17 years ago and the first feature is already available.
As a side note, Microsoft has been working on making Text Services Framework out-of-process, which is expected to mitigate these issues a lot when it becomes available to 3rd party IME developers.
Support Dictation With Text Services Framework - MSDN Magazine 2007 July
https://learn.microsoft.com/en-us/archive/msdn-magazine/2007/july/speak-up-support-dictation-with-text-services-framework
From our observation in #819 and the previous quote in MSDN Magazine, it looks to be safer to assume the following rule can never be guaranteed in Microsoft Word.
ITextStoreACP::RequestLock method (textstor.h)
https://learn.microsoft.com/en-us/windows/win32/api/textstor/nf-textstor-itextstoreacp-requestlock
The text was updated successfully, but these errors were encountered: