Frontmatter
| id | 8164 |
| title | Enhance Neo.manager.Window to Track Full Window Geometry |
| state | Closed |
| labels | enhancementaiarchitecture |
| assignees | tobiu |
| createdAt | Dec 27, 2025, 10:30 PM |
| updatedAt | Dec 28, 2025, 12:53 AM |
| githubUrl | https://github.com/neomjs/neo/issues/8164 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 8163 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Dec 28, 2025, 12:53 AM |
Enhance Neo.manager.Window to Track Full Window Geometry
tobiu added parent issue #8163 on Dec 27, 2025, 10:33 PM
tobiu assigned to @tobiu on Dec 28, 2025, 12:00 AM

tobiu
Dec 28, 2025, 12:53 AM
Input from gemini:
✦ I have implemented the enhanced window geometry tracking to support the "Infinite Canvas" across different browsers.
Key Changes:
Refactored
Neo.manager.Window:
- Added
calculateGeometryto interpret raw window data and deriveinnerRect(viewport),outerRect(frame), andchromedimensions.- Implemented browser-specific logic:
- Firefox: Uses
mozInnerScreenX/Ydirectly for precise viewport positioning.- Safari: Uses
isSafariflag (cached vianavigator.userAgent) to correct for the frame-basedscreenLeft/Topcoordinates by adding calculated chrome.- Chrome/Edge: Uses
screenLeft/Topas the viewport origin (standard behavior).- Updated
onWindowConnectandonWindowPositionChangeto use this robust logic.Updated
Neo.manager.DragCoordinator:
- Switched from manual, brittle coordinate calculations to using the new
targetWindow.innerRect. This ensures drop targets are detected exactly where the user sees them, regardless of browser chrome size.Updated
Neo.Main:
- Modified
getWindowDatato report raw sensor data, includingmozInnerScreenX/Y. It now acts as a dumb sensor, delegating interpretation to the Worker.Reverted
Neo.main.addon.WindowPosition:
- Restored to its simpler state of tracking raw
screenLeft/Topfor movement detection, maintaining clean separation of concerns.This foundation allows precise cross-window coordinate mapping for all major browsers.
tobiu closed this issue on Dec 28, 2025, 12:53 AM
During the implementation of cross-window drag & drop, we discovered that
Neo.manager.Windowprimarily tracked the outer windowrect(screen coordinates of the frame). To correctly position elements inside the viewport (like the drag proxy), we patched it to calculateheaderHeight(outerHeight - innerHeight).Issue: The current
Windowmodel is incomplete. It confounds "Screen Position" (Frame) with "Content Position" (Viewport). This leads to ad-hoc calculations in consumers likeDragCoordinatorto infer the browser chrome size.Goal: Refactor
Neo.manager.Windowto explicitly track and expose:outerRect: The window frame on the OS screen.innerRect(orviewportRect): The content area on the OS screen.chromeDimensions: Top/Left/Right/Bottom border sizes.Benefits:
headerHeightassumptions.