Repository navigation
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Owner
|
Thank you. |
Contributor
Author
|
Thank you. |
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.
Problem
With the uim input method, actions sent from the uim toolbar or the
IM switcher (e.g. "About this program" in the property menu, mode
changes, commit_string) are sometimes silently ignored while mlterm
has input focus.
Cause
uim-helper-server relays every client's messages to all other clients.
helper_read_handler() resets
focused_uimto NULL on any "focus_in"message, assuming another application has taken the focus. But a
background uim client (for example a GTK/Electron application) can
also send "focus_in" while mlterm still has the input focus. In that
case
focused_uimstays NULL until the next focused() call, and"prop_activate", "commit_string" and "im_list_get" are dropped.
Fix
Track whether the terminal itself currently has input focus
(
active_uim, set in focused(), cleared in unfocused() and destroy()),and only clear
focused_uimon a foreign "focus_in" when the terminaldoes not have the focus. Behaviour when switching to another
application is unchanged.
Testing
Built against mlterm with uim 1.9.9. With another
uim client (Electron app) running, selecting "About this program" from
the uim toolbar while mlterm is focused used to work only
intermittently; it now works every time. Switching focus between
mlterm and other uim clients still behaves as before.
Generated with Claude Code