feat(cua): release 0.38.0+artemis.1 with verified shell observation

Upgrade the pinned driver, validate menu and taskbar focus ownership, patch untitled Shell resolution, and remove duplicate scroll scaling. Publish package provenance, verification boundaries and matching marketplace checksum. Go tests, vet, build and byte-level package verification passed.
This commit is contained in:
chenmingxuan committed 2026-10-27 01:13:43 +08:00
1 parent dccddaa7e8
commit b780a60e8d
20 files changed
+759 -149

No files matched your search

+10 -2
View File
@@ -45,8 +45,16 @@ func verifyWindow(pid, hwnd int64, b obj) (obj, bool) {
}
var r struct{ L, T, R, B int32 }
code, _, _ := syscall.NewLazyDLL("dwmapi.dll").NewProc("DwmGetWindowAttribute").Call(uintptr(hwnd), 9, uintptr(unsafe.Pointer(&r)), unsafe.Sizeof(r))
if code != 0 {
return nil, false
if code != 0 || r.R <= r.L || r.B <= r.T {
// Shell menus/taskbars can lack a DWM extended frame. Match their
// actual HWND rectangle; never substitute desktop or another window.
if shellKind(windowClass(hwnd)) == "" {
return nil, false
}
ok, _, _ := user32.NewProc("GetWindowRect").Call(uintptr(hwnd), uintptr(unsafe.Pointer(&r)))
if ok == 0 {
return nil, false
}
}
// Cua uses DWM physical bounds; refuse evidence after a window move/resize.
if int64(r.L) != num(b["left"]) || int64(r.T) != num(b["top"]) || int64(r.R-r.L) != num(b["width"]) || int64(r.B-r.T) != num(b["height"]) {