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:
1 parent
dccddaa7e8
commit
b780a60e8d
20 files changed
+759
-149
No files matched your search
@@ -80,26 +80,11 @@ func sameWindow(a, b obj) bool {
|
||||
|
||||
// Only scroll needs pre-scaling in the pinned driver. click_at is capture-bound
|
||||
// upstream and drag uses the driver's snapshot ratio; never scale either twice.
|
||||
func nativeScrollArgs(f pointerFrame, args obj, readNative func() (pointerFrame, error)) (obj, error) {
|
||||
if err := f.validate("scroll", args); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
native, err := readNative()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !sameWindow(f.window, native.window) || native.width < f.width || native.height < f.height {
|
||||
return nil, errors.New("capture geometry changed; get_window_state again before scrolling")
|
||||
}
|
||||
// Reject a different crop/aspect ratio. One-pixel resize rounding is normal.
|
||||
if math.Abs(float64(f.height)*float64(native.width)/float64(f.width)-float64(native.height)) > float64(native.width)/float64(f.width)+1 {
|
||||
return nil, errors.New("capture aspect ratio changed; get_window_state again before scrolling")
|
||||
}
|
||||
x, _ := coordinate(args["x"])
|
||||
y, _ := coordinate(args["y"])
|
||||
// v0.38.0 scroll and drag use their latest window screenshot context.
|
||||
// Admission stays host-bound to the exact capture; the upstream schema does
|
||||
// not accept capture_id for these two tools. Do not rescale x/y here.
|
||||
func withoutCaptureBinding(args obj) obj {
|
||||
out := copyArgs(args)
|
||||
out["x"] = x * float64(native.width) / float64(f.width)
|
||||
out["y"] = y * float64(native.height) / float64(f.height)
|
||||
delete(out, "capture_id") // v0.36.0 scroll does not support capture binding.
|
||||
return out, nil
|
||||
delete(out, "capture_id")
|
||||
return out
|
||||
}
|
||||
Reference in new issue
Block a user