Commit be624b4
feat(overlay): the toolbar gets its own window, so it can never move or vanish
The pill was drawn inside the catcher's ZStack, which made its position a
function of the catcher panel's frame. That frame changes size on every
open/close, is narrowed to the visible screen, and is dragged around by
AppKit whenever the host moves -- three ways for a control that must never
move to move -- and anything that stalled the catcher (a wedged scroll, a
rebuilt SwiftUI root) took the pill down with it.
The toolbar now has its own permanently mounted panel: fixed size, pinned
to the host's bottom-right, re-placed only when the host moves, resizes or
changes screen. Opening the menu creates a SEPARATE catcher panel over the
host and closing it tears that panel down. The menu is now genuinely just
open or closed, and the toolbar itself is untouched by the transition.
Ordering matters and is not free: re-adding an existing child window does
NOT re-stack it (measured -- childWindows still ended with the catcher, and
the catcher sat on top, eating the click that closes the menu). The toolbar
is detached and re-added, then ordered explicitly above the catcher.
Probe updated for the two-panel world: childWindows.first is no longer "the
overlay", and BOTH panels carry the AX identifier -- correctly, since the
point query must skip both -- so 7g now picks the panel that actually spans
the host rather than the first match.
191 tests, probe 11/11, iOS cross-compile clean.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 3267df7 commit be624b4
4 files changed
Lines changed: 322 additions & 86 deletions
File tree
- Sources
- AnnotKitOverlayProbe
- AnnotKit
- Overlay
- macOS
- Tests/AnnotKitTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
| |||
577 | 576 | | |
578 | 577 | | |
579 | 578 | | |
580 | | - | |
581 | | - | |
582 | | - | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
583 | 602 | | |
584 | 603 | | |
585 | 604 | | |
| |||
593 | 612 | | |
594 | 613 | | |
595 | 614 | | |
| 615 | + | |
| 616 | + | |
596 | 617 | | |
597 | 618 | | |
598 | 619 | | |
| |||
741 | 762 | | |
742 | 763 | | |
743 | 764 | | |
744 | | - | |
| 765 | + | |
745 | 766 | | |
746 | 767 | | |
747 | 768 | | |
| |||
0 commit comments