Skip to content

Add multi-monitor / virtual-desktop geometry#346

Merged
JE-Chen merged 2 commits into
devfrom
feat/monitor-layout-batch
Jun 22, 2026
Merged

Add multi-monitor / virtual-desktop geometry#346
JE-Chen merged 2 commits into
devfrom
feat/monitor-layout-batch

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Jun 22, 2026

Copy link
Copy Markdown
Member

snap_window / arrange_grid / the layout planner all assumed a single primary (width, height) — monitor-blind: they can't tile on a second display or handle a negative-origin virtual desktop, and coordinate_space only rescales a model grid.

  • enumerate_monitors (AC_enumerate_monitors): connected monitors as Monitor dataclasses (index/x/y/width/height/scale/primary/work), with an injectable provider (default mss).
  • Geometry: virtual_bounds (union box, negative origins OK), monitor_at_point / monitor_for_window (max overlap), to_local / to_virtual (virtual↔monitor-local), remap_point (equivalent relative spot across resolutions/DPI), primary_monitor.
  • AC_monitor_at_point (x,y) → which monitor owns a point.
  • Pure arithmetic over plain dataclasses → fully headless-testable (provider injected, geometry on hand-built monitor lists incl. a negative-origin second display). Wired through all 5 layers + headless test + EN/Zh docs + WHATS_NEW. Qt-free.

@JE-Chen JE-Chen merged commit e9285f7 into dev Jun 22, 2026
15 checks passed
@JE-Chen JE-Chen deleted the feat/monitor-layout-batch branch June 22, 2026 22:27
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant