Conversation
This comment has been minimized.
This comment has been minimized.
4de989d to
8d17e85
Compare
8d17e85 to
8390d60
Compare
Goal: Remove `CursorBlinker`. Problem: Spooky action at a distance via `Cursor::HasMoved`. Solution: Moved all the a11y event raising into `_stream.cpp` and pray for the best. Goal: Prevent node.js from tanking conhost performance via MSAA (WHY). Problem: `ServiceLocator`. Solution: Unserviced the locator. Debounced event raising. Performance increased by >10x. Problem 2: Lots of files changed. This PR is a prerequisite for #19330 ## Validation Steps Performed Ran NVDA with and without UIA enabled and with different delays. ✅
8390d60 to
5742c64
Compare
5742c64 to
1c23430
Compare
| // - <none> | ||
| // Return Value: | ||
| // - <none> | ||
| void Window::_UpdateSystemMetrics() const |
There was a problem hiding this comment.
📝 Make sure nobody else called this who cares about the cursor metrics (probably not)
| cursor.SetSize(_d->ulSavedCursorSize); | ||
| cursor.SetIsVisible(_d->fSavedCursorVisible); | ||
| cursor.SetType(_d->savedCursorType); | ||
| cursor.SetIsOn(true); |
There was a problem hiding this comment.
📝 make sure selection has the same cursor behavior
|
|
||
| void TermControl::CursorVisibility(Control::CursorDisplayState cursorVisibility) | ||
| { | ||
| _cursorVisibility = cursorVisibility; |
There was a problem hiding this comment.
It looks like cursor visibility is stored across 3 variables:
TermControl::_cursorVisibilityControlCore::_forceCursorVisibleRenderer::_cursorVisibilityInhibitors
Could we remove the one in TermControl and just query the one in ControlCore? Or, even better, just pipe the value from Renderer all the way up, rather than having a separate boolean member on each layer?
There was a problem hiding this comment.
I actually tried this, but that doesn't work unless we refactor how focus is handled in ControlInteractivity. This is because we make a distinction in TermControl between cursor-visible-because-of-xaml-focus and cursor-visible-because-of-cursor-display-state. ControlCore then ties these together into a single boolean again, with some extra logic on top. If you ask me, it's a mistake to handle XAML/UI-logic in the ControlCore layer like that. It should just be "do I have focus? yes/no" and TermControl decides that.
I would not expose _forceCursorVisible from ControlCore just to remove the _cursorVisibility in TermControl. The variables are duplicated now, but they serve a different purpose. It'd be better to remove the need for forcing the cursor visibility in the first place IMO.
| static DWORD _timerToMillis(TimerRepr t) noexcept; | ||
|
|
||
| // Actual rendering | ||
| [[nodiscard]] HRESULT PaintFrame(); |
There was a problem hiding this comment.
It's a bit weird that this one is marked private, but doesn't have the _ prefix. Plus there's also _PaintFrame() just below it.
There was a problem hiding this comment.
IIRC I did this to help git with reducing the diff size.
|
Oh, and you probably want to update the PR body too. |
carlos-zamora
left a comment
There was a problem hiding this comment.
LGTM. Thanks for doing this 🙂
|
I've merged this now @DHowett so we can move on and fix it in post if needed. |
| } | ||
| } | ||
|
|
||
| why_does_cpp_not_have_labeled_loops: |
DHowett
left a comment
There was a problem hiding this comment.
approved 63/63 after merge. Well done. One nit: StarTimer ⭐
This PR moves the cursor blinker and VT blink rendition timer into
Renderer. To do so, this PR introduces a generic timer system withwhich you can schedule arbitrary timer jobs. Thanks to this, this PR
removes a crapton of code, particularly throughout conhost.
Validation Steps Performed