Chrome "app" closing on focus via Yabai
- Dominant language
- C
- Stars
- 29.6k
- Forks
- 750
- PR merge metrics
- No merged PRs in 30d
Description
This is a strange bug that started manifesting recently, I don't know if it's a yabai issue, a Chrome issue, both, or neither. Steps to (hopefully) reproduce:
1. Take a page in Chrome (I've tested with Google Calendar + GitHub, but it seems page-independent)
2. Go to Chrome three dot menu > Cast, Save, and Share > Install ``
3. The Chrome app opens in a new window
4. Focus to it with yabai (i.e. using a keyboard shortcut)
The window will reliably, 100% of the time, close. If I click the window to focus it with my mouse, it's fine. If I use Yabai to focus _away_ from the Chrome app, or to move windows around, etc, it's fine, normal behavior. But focusing from an adjacent app to a Chrome app window will cause it to close. I accidentally do this a dozen times a day (open Google Calendar Chrome app, try to focus it with keyboard shortcuts, it closes)
This doesn't happen with other windows (i.e. non-Chrome macOS apps like terminals, editors, etc, etc), I can give them focus with the keyboard just fine. But it didn't used to be an issue with Chrome apps either until recently (maybe the last time I updated yabai?)
Also, a point of clarification in case it isn't clear, I'm using "Chrome app" to mean "website 'installed' via Chrome to act like a native application", so it shows up in Spotlight, and renders without a URL bar or normal browser window chrome.
I'm running `yabai-v7.1.25`, the latest, on macOS Tahoe, `Version 26.5.1 (25F80)`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the listed focus sequence with yabai-v7.1.25 on macOS Tahoe, comparing keyboard focus with mouse focus for an installed Chrome app. Trace the behavior from the focus operation and verify that focusing an installed Chrome app no longer closes its window while other focus and window-movement behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, macos
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100