Fix multi-monitor snapshot display selection#283
Conversation
Why: unnamed interactive controls could leave tree_node undefined during semantic tree construction. Impact: preserves existing unnamed-control behavior while avoiding traversal failures.
Why: Win32 monitor indices do not reliably match DXGI output indices. Impact: display selection keeps the existing monitor-index API while falling back when dxcam cannot service a region.
Why: display indices could diverge from Windows active monitor identity and DXGI output order on multi-monitor setups. Impact: Snapshot and Screenshot now resolve display filters through active display metadata, expose available displays in output, and keep the capture flash on the selected region.
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
can you show a demo of it |
|
Can you also show a screenshot of one screen with use_ui_tree and use_annotation as true to check if any grounding is broken after that? I will merge the PR |
|
Is it possible show me the inspect.exe window in multi screen setup |
|















Summary
This PR includes three focused fixes around desktop snapshot correctness:
Skip unnamed semantic children in the UI tree
Match DXCAM outputs by desktop geometry
Align Snapshot/Screenshot display selection with active Windows displays
display=[...]through active Windows display metadata.SnapshotandScreenshotdisplay filtering consistent with the actual capture region.Validation
uv run pytest tests/test_snapshot_display_filter.py tests/test_flash_overlay.py tests/test_screenshot_capture.py87 passedgit diff --checkuv run python -m py_compile src/windows_mcp/uia/core.pyNotes
ruff checkcurrently reports pre-existing lint issues in legacy UIA files; this PR does not broaden into lint cleanup.