Handle native tabs properly
- Dominant language
- C
- Stars
- 29.6k
- Forks
- 750
- PR merge metrics
- No merged PRs in 30d
Description
### Issue
NSDocument-based applications send window created notification on tab creation.
This is a re-iteration of the same issue with chunkwm (https://github.com/koekeishiya/chunkwm/issues/235).
I have created another radar for this issue now that the Catalina beta is a thing. This time around, I got an answer: Works as expected.
iPad apps brought to the Mac using Catalyst have the same behaviour, so this should probably be fixed before the release of macOS 10.15 Catalina.
### Proposed fix
Investigate how Amethyst works around this and replicate the behaviour in yabai.
Here's what they're doing from my understanding: When a `kAXWindowCreated` notification triggers, check whether the window has the same position and same size as another window of the same application. For applications like Terminal, some tolerance is needed because the window size may change ever so slightly when changing tabs.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing yabai's handling of the kAXWindowCreated notification and compare it with Amethyst's workaround, as described in the issue. Reproduce the behavior with an NSDocument-based app, a Catalyst iPad app, and Terminal; done means native tab creation is not treated as a new tiled window while ordinary window creation still works.
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
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100