terminal/src/cascadia
Mike Griese d77745d035
Manually select a new tab when we're in fullscreen mode (#5809)
If we're fullscreen, the TabView isn't `Visible`. If it's not `Visible`,
it's _not_ going to raise a `SelectionChanged` event, which is what we
usually use to focus another tab. Instead, we'll have to do it manually
here.

So, what we're going to try to do is move the focus to the tab to the
left, within the bounds of how many tabs we have.

EX: we have 4 tabs: [A, B, C, D]. If we close:
* A (`tabIndex=0`): We'll want to focus tab B (now in index 0)
* B (`tabIndex=1`): We'll want to focus tab A (now in index 0)
* C (`tabIndex=2`): We'll want to focus tab B (now in index 1)
* D (`tabIndex=3`): We'll want to focus tab C (now in index 2)

`_UpdatedSelectedTab` will do the work of setting up the new tab as the
focused one, and unfocusing all the others.

Also, we need to _manually_ set the SelectedItem of the tabView here. If
we don't, then the TabView will technically not have a selected item at
all, which can make things like ClosePane not work correctly.

## PR Checklist
* [x] Closes #5799
* [x] I work here
* [ ] Tests added/passed
* [n/a] Requires documentation to be updated

## Validation Steps Performed

Played with it a bunch
2020-05-08 11:53:34 -07:00
..
CascadiaPackage Add an AppDescription for the Preview package (#5794) 2020-05-07 11:34:43 -07:00
inc ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00
LocalTests_TerminalApp Add support for setting a tab's color at runtime w/ context menu (#3789) 2020-05-04 20:57:12 +00:00
PublicTerminalCore Remove the title tag from the generated HTML (#5595) 2020-04-29 16:41:56 -07:00
TerminalApp Manually select a new tab when we're in fullscreen mode (#5809) 2020-05-08 11:53:34 -07:00
TerminalAzBridge Add explicit identifier to some constructors (#5652) 2020-04-29 16:50:47 -07:00
TerminalConnection Add WT_PROFILE_ID to the environment of the spawned process (#4852) 2020-04-17 17:15:20 +00:00
TerminalControl Grab the write lock before updating the font (#5654) 2020-04-30 00:05:29 +00:00
TerminalCore Clamp the new rows scrolling value to a positive number (#5630) 2020-04-29 19:28:59 +00:00
TerminalSettings Rework and simplify selection in TermControl (#5096) 2020-03-25 21:09:49 +00:00
UnitTests_TerminalCore Make sure that EraseAll moves the Terminal viewport (#5683) 2020-05-05 01:36:30 +00:00
ut_app Add support for setting a tab's color at runtime w/ context menu (#3789) 2020-05-04 20:57:12 +00:00
WindowsTerminal Add a new appxmanifest for preview (#5774) 2020-05-07 16:00:56 +00:00
WindowsTerminalUniversal Add a new appxmanifest for preview (#5774) 2020-05-07 16:00:56 +00:00
WinRTUtils deps: upgrade CppWinRT to 2.0.200316.3, gsl to v2.1.0 (#4536) 2020-03-23 17:15:24 +00:00
WpfTerminalControl wpf: only dismiss selection for real chars, not modifiers (#5388) 2020-04-17 11:28:56 -07:00
CascadiaResources.build.items Add a new appxmanifest for preview (#5774) 2020-05-07 16:00:56 +00:00