[PR #5385] Fix a deadlock and a bounding rects issue in UIA #26304

Closed
opened 2026-01-31 09:15:14 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/5385

State: closed
Merged: Yes


The scroll locking rework that landed with the DxRenderer's partial
invalidation change introduced a deadlock. UIA locks the buffer for
reading before asking it to scroll (which now requires a write lock.)

Scrolling is probably okay to have a little bit of torn state that
might arise from us unlocking the read lock early before triggering the
write lock down the line.

While investigating this, I also noticed that our bounding rects stopped
being viewport-relative (and were instead buffer-relative.) That
regressed with the switch to GetTextRects in #4991

PR Checklist

  • Closes (issues noticed in investigating the DPI changes)
  • CLA signed.
  • Tests added/passed
  • Requires documentation to be updated
  • Core contributor badge

Validation Steps Performed

Manual pass with inspect.exe

**Original Pull Request:** https://github.com/microsoft/terminal/pull/5385 **State:** closed **Merged:** Yes --- The scroll locking rework that landed with the DxRenderer's partial invalidation change introduced a deadlock. UIA locks the buffer for reading before asking it to scroll (which now requires a write lock.) Scrolling is probably _okay_ to have a little bit of torn state that might arise from us unlocking the read lock early before triggering the write lock down the line. While investigating this, I also noticed that our bounding rects stopped being viewport-relative (and were instead buffer-relative.) That regressed with the switch to `GetTextRects` in #4991 ## PR Checklist * [ ] Closes (issues noticed in investigating the DPI changes) * [x] CLA signed. * [ ] Tests added/passed * [ ] Requires documentation to be updated * [x] Core contributor badge ## Validation Steps Performed Manual pass with inspect.exe
claunia added the pull-request label 2026-01-31 09:15:14 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26304