You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UIA BoundingRectangle values are physical screen pixels, while WinUI layout values are device-independent pixels (DIPs). Callers currently lack the target window's DPI context for conversion.
inspect and search already expose typed numeric element geometry, but get-property --json converts values such as BoundingRectangle and IsOffscreen to strings. Some shipped JSON documentation also says controlType even though the published element model emits type.
Describe the solution you'd like
Add explicit, additive geometry context without removing published fields:
On each inspect --jsonwindows[] entry, and on the target reported by status --json, add:
windowDpi: the value returned by GetDpiForWindow(hwnd)
scale: windowDpi / 96
dpiAwareness: unaware, system-aware, or per-monitor-aware
coordinateSpace: physical-screen-pixels
Describe these as the window's DPI context, not unconditional monitor DPI. GetDpiForWindow returns 96 for unaware windows, system DPI for system-aware windows, and monitor DPI for per-monitor-aware windows.
Add a scrubbed, typed element object to get-property --json, while preserving its existing elementId and string-valued properties map.
Preserve existing numeric x, y, width, and height.
Document that 0,0,0,0 is UIA's empty/no-displayed-UI rectangle in this COM projection. Add no redundant bounds marker.
Keep isOffscreen independent because an offscreen element may still have nonzero bounds.
Keep the published type field canonical and correct documentation/examples that currently say controlType.
Document the actual inspect, search, wait-for, and get-property envelopes.
Additional context
Validate the contract on mixed-DPI monitors with a per-monitor-aware WinUI window and popup HWND on different monitors. Invalid HWND/DPI reads must be surfaced explicitly rather than silently defaulting to 96.
Activity
winapp uineeds scoped/typed queries, text attributes and a batch mode to back a real UI suite #798Add typed UI geometry context (#844)