gui/window: keep the window frame across starts, take the first click

- Options.FrameFile: the window's position, size and maximized state in
  a small JSON file, read at New (a frame on no connected screen is
  ignored, the window opens centered), written shortly after every move
  or resize and at Destroy. macOS: NSWindow frame (the normal frame
  under a zoomed one), checked against NSScreen visible frames; Windows:
  Get/SetWindowPlacement, checked with MonitorFromRect.
- macOS: the web view is a WKWebView subclass that accepts the first
  mouse click, so a page in an inactive window reacts to it instead of
  the click only activating the window (yanks' start dialog).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
terminarandClaude Opus 5.5 committed 2026-11-15 15:19:45 +01:00
1 parent c16b871db5
commit 31dbc347e8
9 files changed
+325 -13

No files matched your search

+7 -5
View File
@@ -47,11 +47,13 @@ speculatively.
`yetano.dev/yetano/core/gui` (`gui/v0.1.0`). The prototype uses it.
- [ ] Move yet-gui off its copy in `yet/gui/internal` onto `core/gui`
(steps in [gui/README.md](gui/README.md)).
- [ ] `core/gui` (macOS): the web view should accept the first mouse
click in an inactive window (a WKWebView subclass with
`acceptsFirstMouse:` YES) -- today the first click only activates
the window, so a dialog shown at start looks dead (yanks,
2026-11-14; yanks now waits for the focus before showing it).
- [x] `core/gui` (macOS): the web view accepts the first mouse click in
an inactive window (`YTWebView`, `acceptsFirstMouse:` YES;
`gui/v0.2.0`, 2026-11-15) -- before, the first click only activated
the window, so a dialog shown at start looked dead (yanks).
- [x] `core/gui`: `window.Options.FrameFile` keeps the window's position,
size and maximized state across starts (macOS and Windows;
`gui/v0.2.0`, 2026-11-15).
- [ ] `core/gui`: Linux/FreeBSD backend (WebKitGTK) -- see gui/README.md.
- [x] `core/tui`: shared TUI kernel (themes, styles, Paint/Outer,
ListState, text helpers) as the nested module