Skip to content

fix: don't activate default im when switch focus within app#371

Merged
eagleoflqj merged 2 commits into
masterfrom
appim
May 13, 2026
Merged

fix: don't activate default im when switch focus within app#371
eagleoflqj merged 2 commits into
masterfrom
appim

Conversation

@eagleoflqj

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to prevent the macOS frontend from re-activating an app’s default input method when focus moves between input fields within the same application, avoiding unintended IM switches during intra-app focus changes.

Changes:

  • Add lastFocusedApp_ state to track the last focused application bundle ID.
  • Gate useAppDefaultIM(program) in focusIn so it only runs when the focused app differs from lastFocusedApp_.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
macosfrontend/macosfrontend.h Adds lastFocusedApp_ member to remember the last focused app ID.
macosfrontend/macosfrontend.cpp Updates focusIn logic to only apply app default IM when focus enters a different app.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread macosfrontend/macosfrontend.cpp
Comment thread macosfrontend/macosfrontend.cpp Outdated
@github-actions

Copy link
Copy Markdown

arm64 comparison

No difference.

x86_64 comparison

No difference.

@eagleoflqj eagleoflqj merged commit d090c7c into master May 13, 2026
7 checks passed
@eagleoflqj eagleoflqj deleted the appim branch May 13, 2026 04:00
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