terminal/src/cascadia/TerminalApp
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
..
lib Add support for setting a tab's color at runtime w/ context menu (#3789) 2020-05-04 20:57:12 +00:00
Resources/en-US Add support for setting a tab's color at runtime w/ context menu (#3789) 2020-05-04 20:57:12 +00:00
ActionAndArgs.cpp Add support for arbitrary args in keybindings (#3391) 2019-11-14 16:23:40 -06:00
ActionAndArgs.h Add support for arbitrary args in keybindings (#3391) 2019-11-14 16:23:40 -06:00
ActionArgs.cpp Add support for new panes with specifc profiles and other settings overrides (#3825) 2019-12-09 13:02:29 +00:00
ActionArgs.h Add explicit identifier to some constructors (#5652) 2020-04-29 16:50:47 -07:00
ActionArgs.idl Rename copy keybinding arg (#5216) 2020-04-02 23:10:28 +00:00
App.base.h Apply a GDI region to the top level Island window to allow dragging with a single Island (#929) 2019-06-25 13:06:11 -07:00
App.cpp Create Telnet connection type and default loopback profile for… (#3858) 2019-12-09 11:07:08 -08:00
App.h Break everything out of App except Xaml platform init (#3465) 2019-11-07 13:10:58 -08:00
App.idl ci: spelling: update to 0.0.15a; update whitelist (#5413) 2020-04-21 14:07:04 -07:00
App.xaml Replace the HRGN-based titlebar cutout with an overlay window (#5485) 2020-04-24 15:22:40 -07:00
AppActionHandlers.cpp Rename copy keybinding arg (#5216) 2020-04-02 23:10:28 +00:00
AppCommandlineArgs.cpp Add support for displaying the version with wt --version (#5501) 2020-05-04 20:56:15 +00:00
AppCommandlineArgs.h Add support for displaying the version with wt --version (#5501) 2020-05-04 20:56:15 +00:00
AppKeyBindings.cpp Encapsulate dispatching ShortcutActions in it's own class (#3658) 2019-11-27 15:51:38 -06:00
AppKeyBindings.h Add warning messages for bad keybindings (#4746) 2020-03-05 21:06:58 +00:00
AppKeyBindings.idl Encapsulate dispatching ShortcutActions in it's own class (#3658) 2019-11-27 15:51:38 -06:00
AppKeyBindingsSerialization.cpp Remove a heap of legacy settings deserialization (#5190) 2020-03-31 13:58:28 -07:00
AppLogic.cpp Add support for displaying the version with wt --version (#5501) 2020-05-04 20:56:15 +00:00
AppLogic.h Add support for displaying the version with wt --version (#5501) 2020-05-04 20:56:15 +00:00
AppLogic.idl Add support for displaying the version with wt --version (#5501) 2020-05-04 20:56:15 +00:00
AzureCloudShellGenerator.cpp Implement ConnectionState and closeOnExit=graceful/always/never (#3623) 2019-11-25 14:22:29 -08:00
AzureCloudShellGenerator.h Add Dynamic Profile Generators (#2603) 2019-09-16 13:34:27 -07:00
CascadiaSettings.cpp Add a warning about using the globals property (#5597) 2020-04-27 22:20:18 +00:00
CascadiaSettings.h Add explicit identifier to some constructors (#5652) 2020-04-29 16:50:47 -07:00
CascadiaSettingsSerialization.cpp Add default values to defaults.json (#5231) 2020-04-09 23:13:57 +00:00
ColorHelper.cpp Fix a few minor typos from #3789 (#5740) 2020-05-04 16:47:29 -05:00
ColorHelper.h Add support for setting a tab's color at runtime w/ context menu (#3789) 2020-05-04 20:57:12 +00:00
ColorPickupFlyout.cpp Add support for setting a tab's color at runtime w/ context menu (#3789) 2020-05-04 20:57:12 +00:00
ColorPickupFlyout.h Add support for setting a tab's color at runtime w/ context menu (#3789) 2020-05-04 20:57:12 +00:00
ColorPickupFlyout.idl Add support for setting a tab's color at runtime w/ context menu (#3789) 2020-05-04 20:57:12 +00:00
ColorPickupFlyout.xaml Add support for setting a tab's color at runtime w/ context menu (#3789) 2020-05-04 20:57:12 +00:00
ColorScheme.cpp Remove a heap of legacy settings deserialization (#5190) 2020-03-31 13:58:28 -07:00
ColorScheme.h Add cursorColor to color scheme (#4651) 2020-03-17 20:11:03 +00:00
Commandline.cpp Add support for commandline args to wt.exe (#4023) 2020-01-27 15:34:12 +00:00
Commandline.h Add support for commandline args to wt.exe (#4023) 2020-01-27 15:34:12 +00:00
DebugTapConnection.cpp Add a "debug tap" that lets you see the VT behind a connection (#5127) 2020-03-26 15:33:47 -07:00
DebugTapConnection.h Add explicit identifier to some constructors (#5652) 2020-04-29 16:50:47 -07:00
DefaultProfileUtils.cpp Patch the default profile and version into the settings template (#5232) 2020-04-07 11:35:05 -07:00
DefaultProfileUtils.h Add Dynamic Profile Generators (#2603) 2019-09-16 13:34:27 -07:00
defaults-universal.json Include Cascadia Mono in-package, switch to it by default (#5505) 2020-04-23 22:12:36 +00:00
defaults.json Improve default foregrounds for Tango schemes (#5598) 2020-04-27 15:20:02 -07:00
FixVisualStudioBug.targets Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
GlobalAppSettings.cpp Add 'copyFormatting' global setting (#5299) 2020-04-09 23:32:38 +00:00
GlobalAppSettings.h Add 'copyFormatting' global setting (#5299) 2020-04-09 23:32:38 +00:00
IDynamicProfileGenerator.h Add Dynamic Profile Generators (#2603) 2019-09-16 13:34:27 -07:00
IF7Listener.idl Tunnel F7 keypresses directly into special handlers in TermControl (#4807) 2020-03-05 20:35:46 +00:00
init.cpp Introduce a WinRT utils library and "checked resources" (#3350) 2019-11-01 15:47:05 -07:00
JsonUtils.cpp Gracefully handle json data with the wrong value types (#4961) 2020-03-20 20:35:51 +00:00
JsonUtils.h Gracefully handle json data with the wrong value types (#4961) 2020-03-20 20:35:51 +00:00
KeyChordSerialization.cpp Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
KeyChordSerialization.h Support remapping keybindings (#748) 2019-05-21 09:26:04 -05:00
LegacyProfileGeneratorNamespaces.h Create Telnet connection type and default loopback profile for… (#3858) 2019-12-09 11:07:08 -08:00
MinMaxCloseControl.cpp Unify and clean up the common build properties (#3429) 2019-11-05 14:29:11 -08:00
MinMaxCloseControl.h Propagate window style changes to the titlebar and minmax (#3025) 2019-10-02 10:27:07 -07:00
MinMaxCloseControl.idl Propagate window style changes to the titlebar and minmax (#3025) 2019-10-02 10:27:07 -07:00
MinMaxCloseControl.xaml Polish AutomationProperties and UIA Tree Navigation (#4805) 2020-03-05 22:32:46 +00:00
packages.config deps: upgrade CppWinRT to 2.0.200316.3, gsl to v2.1.0 (#4536) 2020-03-23 17:15:24 +00:00
Pane.cpp Process actions sync. on startup; don't dupe nonexistent profile (#5090) 2020-03-25 17:03:32 -07:00
Pane.h Add explicit identifier to some constructors (#5652) 2020-04-29 16:50:47 -07:00
Pane.LayoutSizeNode.cpp Snap to character grid when resizing window (#3181) 2020-01-08 13:19:23 -08:00
pch.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
pch.h Refactor TerminalApp and Add Tests for Xaml Content (#1164) 2019-07-15 14:27:56 -05:00
PowershellCoreProfileGenerator.cpp Patch the default profile and version into the settings template (#5232) 2020-04-07 11:35:05 -07:00
PowershellCoreProfileGenerator.h Patch the default profile and version into the settings template (#5232) 2020-04-07 11:35:05 -07:00
Profile.cpp Remove last lingering references to profiles.json (#5534) 2020-04-24 21:29:33 +00:00
Profile.h Add explicit identifier to some constructors (#5652) 2020-04-29 16:50:47 -07:00
ShortcutActionDispatch.cpp Remove a heap of legacy settings deserialization (#5190) 2020-03-31 13:58:28 -07:00
ShortcutActionDispatch.h Search - add search box control and implement search experience (#3590) 2019-12-17 15:52:37 +00:00
ShortcutActionDispatch.idl Remove a heap of legacy settings deserialization (#5190) 2020-03-31 13:58:28 -07:00
Tab.cpp Add support for setting a tab's color at runtime w/ context menu (#3789) 2020-05-04 20:57:12 +00:00
Tab.h Add support for setting a tab's color at runtime w/ context menu (#3789) 2020-05-04 20:57:12 +00:00
Tab.idl Convert Tab to a WinRT type (#4350) 2020-02-04 21:51:11 +00:00
TabRowControl.cpp Upgrade to Microsoft.UI.Xaml 2.2 (#3027) 2019-10-14 22:41:43 -07:00
TabRowControl.h Upgrade to Microsoft.UI.Xaml 2.2 (#3027) 2019-10-14 22:41:43 -07:00
TabRowControl.idl Upgrade to Microsoft.UI.Xaml 2.2 (#3027) 2019-10-14 22:41:43 -07:00
TabRowControl.xaml Polish AutomationProperties and UIA Tree Navigation (#4805) 2020-03-05 22:32:46 +00:00
TelnetGenerator.h Create Telnet connection type and default loopback profile for… (#3858) 2019-12-09 11:07:08 -08:00
TerminalApp.def Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
TerminalApp.vcxproj deps: upgrade CppWinRT to 2.0.200316.3, gsl to v2.1.0 (#4536) 2020-03-23 17:15:24 +00:00
TerminalPage.cpp Manually select a new tab when we're in fullscreen mode (#5809) 2020-05-08 11:53:34 -07:00
TerminalPage.h Add support for setting a tab's color at runtime w/ context menu (#3789) 2020-05-04 20:57:12 +00:00
TerminalPage.idl Add support for displaying the version with wt --version (#5501) 2020-05-04 20:56:15 +00:00
TerminalPage.xaml On second thought, embed the third-party notices in the package (#5673) 2020-04-30 15:06:13 -07:00
TerminalWarnings.h Add explicit identifier to some constructors (#5652) 2020-04-29 16:50:47 -07:00
TitlebarControl.cpp Add support for setting a tab's color at runtime w/ context menu (#3789) 2020-05-04 20:57:12 +00:00
TitlebarControl.h Add support for setting a tab's color at runtime w/ context menu (#3789) 2020-05-04 20:57:12 +00:00
TitlebarControl.idl Upgrade to Microsoft.UI.Xaml 2.2 (#3027) 2019-10-14 22:41:43 -07:00
TitlebarControl.xaml Upgrade to Microsoft.UI.Xaml 2.2 (#3027) 2019-10-14 22:41:43 -07:00
userDefaults.json Add copyFormatting setting to all settings json files (#5404) 2020-04-20 23:49:12 +00:00
Utils.cpp Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
Utils.h Upgrade to Microsoft.UI.Xaml 2.2 (#3027) 2019-10-14 22:41:43 -07:00
WslDistroGenerator.cpp Force WslDistroGenerator to timeout after 10s and return Profiles (#4905) 2020-03-16 18:14:25 +00:00
WslDistroGenerator.h Add Dynamic Profile Generators (#2603) 2019-09-16 13:34:27 -07:00