Skip to content

fix: use AXFrontmost instead of activate_application to prevent cross-display focus redirect#129

Merged
typester merged 1 commit intomainfrom
fix/faster-focus-change
Feb 8, 2026
Merged

fix: use AXFrontmost instead of activate_application to prevent cross-display focus redirect#129
typester merged 1 commit intomainfrom
fix/faster-focus-change

Conversation

@typester
Copy link
Copy Markdown
Owner

@typester typester commented Feb 8, 2026

When same-app windows exist on multiple displays, activate_application (NSRunningApplication.activateWithOptions) causes macOS to re-evaluate which window should be focused, often picking the wrong one on another display. Replace with AXFrontmost attribute which makes the app frontmost without re-evaluating window focus. Falls back to activate_application if AXFrontmost fails.

…-display focus redirect

When same-app windows exist on multiple displays, activate_application (NSRunningApplication.activateWithOptions)
causes macOS to re-evaluate which window should be focused, often picking the wrong one on another display.
Replace with AXFrontmost attribute which makes the app frontmost without re-evaluating window focus.
Falls back to activate_application if AXFrontmost fails.
@typester typester merged commit 8150988 into main Feb 8, 2026
2 checks passed
@typester typester deleted the fix/faster-focus-change branch February 8, 2026 18:28
@github-actions github-actions Bot mentioned this pull request Feb 8, 2026
typester pushed a commit that referenced this pull request Feb 8, 2026
## 🤖 New release

* `yashiki-ipc`: 0.10.6 -> 0.10.7
* `yashiki`: 0.10.6 -> 0.10.7
* `yashiki-layout-tatami`: 0.10.6 -> 0.10.7
* `yashiki-layout-byobu`: 0.10.6 -> 0.10.7

<details><summary><i><b>Changelog</b></i></summary><p>

## `yashiki-ipc`

<blockquote>

##
[0.10.7](yashiki-ipc-v0.10.6...yashiki-ipc-v0.10.7)
- 2026-02-08

### Added

- add file-based logging with runtime log level control
([#130](#130))
</blockquote>

## `yashiki`

<blockquote>

##
[0.10.7](yashiki-v0.10.6...yashiki-v0.10.7)
- 2026-02-08

### Added

- add file-based logging with runtime log level control
([#130](#130))

### Fixed

- use AXFrontmost instead of activate_application to prevent
cross-display focus redirect
([#129](#129))
- retry observer registration on AppLaunched and fix CallbackContext
leak ([#128](#128))
</blockquote>

## `yashiki-layout-tatami`

<blockquote>

##
[0.7.3](yashiki-layout-tatami-v0.7.2...yashiki-layout-tatami-v0.7.3)
- 2026-01-20

### Other

- update Cargo.lock dependencies
</blockquote>

## `yashiki-layout-byobu`

<blockquote>

##
[0.7.3](yashiki-layout-byobu-v0.7.2...yashiki-layout-byobu-v0.7.3)
- 2026-01-20

### Other

- update Cargo.lock dependencies
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions Bot mentioned this pull request Feb 8, 2026
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.

1 participant