mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-31 16:33:34 +08:00
setInteractiveRegions only recorded visibleDragRegion inside the darwin branch, so on Windows and Linux it stayed null and dragging fell back to clamping against the whole PET_WINDOW_WIDTH x PET_WINDOW_HEIGHT window. That window is mostly transparent padding around a mascot anchored bottom center, so the mascot stopped short of every display edge by the width of that padding and could not be dragged into a corner. Record the region on all platforms; the reposition-on-restore step stays darwin-only. Normalizing the region also clamped against the nominal constants. Renderer regions are measured against the live viewport, so clamp against the real content box instead -- the same petWindowContentExtent the shape clamp already uses -- and let the shape clamp reuse that one normalizer.