terminal/src
Michael Niksa 98ac196cec
Lock when changing selection endpoint on wheel/auto-scroll (#5551)
Takes the lock inside two routines in `TermControl` that were changing
the selection endpoint while a rendering frame was still drawing,
resulting in several variants of graphical glitches from double-struck
selection boxes to duplicated line text.

## References
- Introduced with #5185

## PR Checklist
* [x] Closes #5471 
* [x] Already signed life away to company.
* [x] Manual tests passed since it's visual.
* [x] No extra doc besides the comments.
* [x] Am core contributor: Roar.

The renderer base and specific renderer engine do a lot of work to
remember the previous selection and compensate for scrolling regions and
deltas between frames. However, all that work doesn't quite match up
when the endpoints are changed out from under it. Unfortunately,
`TermControl` doesn't have a robust history of locking correctly in step
with the renderer nor does the renderer's `IRenderData` currently
provide any way of 'snapping' state at the beginning of a frame so it
could work without a full lock. So the solution for now is for the
methods that scroll the display in `TermControl` to take the lock that
is shared with the renderer's frame painter so they can't change out of
sync.

## Validation Steps Performed
- Opened terminal with Powershell core.
  Did ls a bunch of times.
  Clicked to make selection and held mouse button while wheeling around.
- Opened terminal with Powershell core.;
  Did ls a bunch of times.
  Clicked to make selection and dragged mouse outside the window to make
  auto scroll happen.
- Opened terminal with Powershell core.
  Did ls a bunch of times.
  Clicked to make selection and released. Wheeled around like a crazy
  person to make sure I didn't regress that.
2020-04-24 15:14:43 -07:00
..
buffer Show a double width cursor for double width characters (#5319) 2020-04-15 19:23:06 +00:00
cascadia Lock when changing selection endpoint on wheel/auto-scroll (#5551) 2020-04-24 15:14:43 -07:00
dep build: move oss required to build conhost out of dep/ (#5451) 2020-04-21 14:43:09 -07:00
host Adjusts High DPI scaling to enable differential rendering (#5345) 2020-04-22 14:59:51 -07:00
inc Include Cascadia Mono in-package, switch to it by default (#5505) 2020-04-23 22:12:36 +00:00
interactivity ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00
internal Merged PR 4271163: [Git2Git] Remove use of private theme APIs 2020-02-03 23:13:31 +00:00
propsheet ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00
propslib Change NULL to nullptr since they are pointers (#4960) 2020-03-20 20:35:12 +00:00
renderer Use grayscale AA always on non-opaque backgrounds (#5277) 2020-04-24 17:16:34 +00:00
server ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00
terminal Send a Ctrl-C KeyUp event (#5431) 2020-04-22 17:28:04 +00:00
testlist inbox: Merge accumulated build fixes from RS_ONECORE_DEP_ACIOSS (#1002) 2019-05-24 12:28:30 -07:00
til Adjusts High DPI scaling to enable differential rendering (#5345) 2020-04-22 14:59:51 -07:00
tools Remove last lingering references to profiles.json (#5534) 2020-04-24 21:29:33 +00:00
tsf ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00
types Adjusts High DPI scaling to enable differential rendering (#5345) 2020-04-22 14:59:51 -07:00
winconpty Change NULL to nullptr since they are pointers (#4960) 2020-03-20 20:35:12 +00:00
common.build.post.props Add experimental retro terminal effects (#3468) 2019-12-12 13:44:01 +00:00
common.build.pre.props Enable Control Flow Guard in the common build props (#5453) 2020-04-22 11:30:13 -07:00
common.build.tests.props Move ConPTY to use til::bitmap (#5024) 2020-03-23 15:57:54 +00:00
ConsolePerf.regions.xml Tab to spaces (#578) 2019-05-13 18:06:36 -07:00
ConsolePerf.wprp Fix the WPR profile (#4007) 2019-12-17 17:14:15 -08:00
cppwinrt.build.post.props deps: upgrade CppWinRT to 2.0.200316.3, gsl to v2.1.0 (#4536) 2020-03-23 17:15:24 +00:00
cppwinrt.build.pre.props deps: upgrade CppWinRT to 2.0.200316.3, gsl to v2.1.0 (#4536) 2020-03-23 17:15:24 +00:00
dirs build: move oss required to build conhost out of dep/ (#5451) 2020-04-21 14:43:09 -07:00
project.inc build: move oss required to build conhost out of dep/ (#5451) 2020-04-21 14:43:09 -07:00
project.unittest.inc inbox: merge refactoring payload from FI 2019-06-11 17:01:26 -07:00
StaticAnalysis.ruleset Combined changes to make the build work again (see inside) (#2945) 2019-09-30 10:39:55 -07:00
unit.tests.x64.runsettings Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
unit.tests.x86.runsettings Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
wap-common.build.post.props Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
wap-common.build.pre.props Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00