Skip to content

Add window client-area geometry (frame insets, client-relative point)#361

Merged
JE-Chen merged 1 commit into
devfrom
feat/window-geometry-batch
Jun 23, 2026
Merged

Add window client-area geometry (frame insets, client-relative point)#361
JE-Chen merged 1 commit into
devfrom
feat/window-geometry-batch

Conversation

@JE-Chen

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

Copy link
Copy Markdown
Member

window_capture.get_window_geometry returns only a window's outer bbox — there was no client-area rect, frame-inset math, or client→screen point mapping, so you couldn't reliably click inside a window regardless of its title bar / borders.

  • frame_insets(window_rect, client_rect){left, top, right, bottom} border/title-bar thickness (pure).
  • client_to_screen(client_rect, x, y) → screen point (pure).
  • get_client_rect(title) (AC_get_client_rect): client area as (x, y, width, height) in screen coords, via an injectable Win32 reader (GetClientRect+ClientToScreen), None off Windows.
  • client_point(title, x, y) (AC_client_point): map a content-relative point to the screen — click inside the window regardless of chrome.
  • Pure helpers are headless-testable (reader injected). Wired through all 5 layers + headless test + EN/Zh docs + WHATS_NEW. Qt-free.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 23 complexity · 0 duplication

Metric Results
Complexity 23
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@JE-Chen JE-Chen merged commit 6f06aa9 into dev Jun 23, 2026
16 checks passed
@JE-Chen JE-Chen deleted the feat/window-geometry-batch branch June 23, 2026 03:52
@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