Skip to content

v0.1.13

Choose a tag to compare

@github-actions github-actions released this 19 Oct 04:34
· 3 commits to main since this release

cell 0.1.13

新功能:窗口位置 / 大小记忆(cellui)

  • DSHL 风格:window.json 记录 {x, y, width, height, maximized},启动时恢复;按当前显示器工作区钳制(保存在已断开显示器上的窗口仍会出现在可见区域);最小 640×480;严格校验、原子写入。
  • Windows 用 GetWindowPlacement 读 NORMAL 矩形(最大化时也能记住还原后的位置),MonitorFromRect 选择最近的工作区。
  • 窗口监督线程改为在 webui_show_wv 之前启动:show() 在 WebView2 桥断开时可能很晚返回,监督线程必须在 HWND 出现的第一时间持久化;首次扫描还会重放一次保存的矩形(WebUI 自身的摆放可能覆盖早期的 SetWindowPos)。
  • --size 仍优先于记忆尺寸;记忆位置保留。webui_set_minimum_size 防止窗口被缩到不可用。

测试

  • TDD:先写 selftest(越界钳制 / 负坐标显示器 / 过小 / 过大 / JSON 往返),实现前 6 项失败,实现后全绿。
  • 实机:tests/cellui_geometry.py(CELLUI_GEOMETRY_TEST=1)把窗口移到 (60,50,1160,880),校验 window.json,关闭重启后逐像素一致;两次运行的截图输出到 build/rel-assets/window-geometry/。

提交

  • 271127a feat: remember the desktop window's position and size
  • d4cb62c test: real-machine window geometry test with screenshots
  • 35e7ee1 docs: document the shell's window.json state