Create

Sign in to ReadmeX

or

How we handle your data: Privacy Policy

ReadmeX

Your AI reading companion

What would you like to catch up on?

Pick a briefing, or ask your own question.

Your community and people briefings stay personal to you.

Story

Qiban’s Windows desktop pet uses rectangle polling for click-through

AI summary

A technical analysis of Qiban’s Windows desktop companion describes a transparent, undecorated Tauri window and a 40ms polling loop that converts cursor coordinates into window-local logical coordinates. The frontend reports visible interaction rectangles, while Rust enables native mouse-event pass-through outside them and defaults to pass-through if cursor, window-origin, or scale queries fail. Position changes are stored in a separate desktop-settings database, checked every 250ms, and persisted after a 400ms debounce; failed writes remain pending for retry. The analysis also notes polling latency, rectangle-based rather than SVG-pixel hit testing, periodic screen-boundary recovery, and unverified multi-display, mixed-DPI, monitor-disconnection, performance, and foreground-focus scenarios. The 40ms interval’s selection basis was not quantified.

In-depth insight

The report provides a concrete implementation reference for dynamic Windows desktop companions. It explicitly contrasts rectangle polling with simpler whole-window pass-through, showing the additional frontend-to-Rust coordination, latency, and approximation required when interactive regions change with the character and chat bubble.

Windows 桌宠最难的不是 Live2D,也不是模型对话,是窗口本身——透明、鼠标穿透、位置记忆,三件没什么人写的脏活。角色渲染与对话链路的难处,网上已经写了很多;窗口这一层写得少,因为它不性感,全是边界【从业者判断——选题观察】。

这是《栖伴造记》第四篇;上一篇(86)里透明穿透只给了一句、注明留给本篇——现在兑现:把那句 40ms,展开成它应得的整篇。

本篇引用的窗口代码共六处:pet.rs、placement.rs、tray.rs、lib.rs 窗口段、Pet.tsx、useSceneDrag.ts【仓库直核】。

时点钉死:2026-11-04,origin/main @ 060012e,与事实底稿时间线核对一致【仓库直核;事实底稿·时间线】。经 git diff 核对,这六处在 v0.2.5 与 v0.3.1(tag dacc873)之间零差异(lib.rs 另有 3 行非窗口差异:一处模块声明、两处命令注册,不涉窗口段)【仓库直核】——本文工程数字都出自这段稳定的窗口层。

dacc873 之后 21 秒的 060012e 是合并提交:把 dacc873 的发布元数据折进 main,main 侧另带进一处 CSS 类名重命名——与 dacc873 相比只差这处类名,不碰窗口文件,零差异结论不变【仓库直核】。

#Qiban#Tauri#Tao#Live2D

Original · 16 min readRead the original
Group chat

No comments yet. Start the conversation.