Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dev/migrie/s/3327-xam…
Browse files Browse the repository at this point in the history
…l-theming
  • Loading branch information
zadjii-msft committed Feb 18, 2022
2 parents 6abb5fa + 961c576 commit bfd8f73
Show file tree
Hide file tree
Showing 51 changed files with 69 additions and 118 deletions.
13 changes: 0 additions & 13 deletions .github/actions/spelling/expect/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ ACTCTXW
activatable
ACTIVEBORDER
ACTIVECAPTION
adaa
ADDALIAS
ADDREF
addressof
Expand Down Expand Up @@ -190,7 +189,6 @@ cacafire
callee
capslock
CARETBLINKINGENABLED
carlos
CARRIAGERETURN
cascadia
cassert
Expand Down Expand Up @@ -485,7 +483,6 @@ dai
DATABLOCK
DATAVIEW
DATAW
datetime
DBatch
dbcs
DBCSCHAR
Expand Down Expand Up @@ -681,8 +678,6 @@ dxp
dxsm
dxttbmp
Dyreen
eachother
eae
eaf
EASTEUROPE
ECH
Expand All @@ -704,7 +699,6 @@ elems
elif
elseif
emacs
emplate
EMPTYBOX
enabledelayedexpansion
endian
Expand Down Expand Up @@ -834,7 +828,6 @@ FORCEOFFFEEDBACK
FORCEONFEEDBACK
FORCEV
foreach
forground
fprintf
framebuffer
FRAMECHANGED
Expand Down Expand Up @@ -1016,7 +1009,6 @@ horiz
HORZ
hostable
hostlib
Hostx
HPA
HPAINTBUFFER
HPCON
Expand Down Expand Up @@ -1143,7 +1135,6 @@ INPUTPROCESSORPROFILE
inputrc
Inputreadhandledata
INSERTMODE
installationpath
intellisense
INTERACTIVITYBASE
INTERCEPTCOPYPASTE
Expand Down Expand Up @@ -1447,7 +1438,6 @@ mkdir
MMBB
mmcc
MMCPL
MMdd
mmsystem
MNC
MNOPQ
Expand Down Expand Up @@ -1706,7 +1696,6 @@ outfile
Outof
OUTOFCONTEXT
OUTOFMEMORY
outout
Outptr
outstr
OVERLAPPEDWINDOW
Expand Down Expand Up @@ -1858,7 +1847,6 @@ pragma
prc
prealigned
prebuilt
precendence
precomp
prect
prefast
Expand Down Expand Up @@ -2889,7 +2877,6 @@ YCast
YCENTER
YCount
YDPI
yIcon
yml
YOffset
YPosition
Expand Down
2 changes: 1 addition & 1 deletion build/pipelines/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ stages:
sed -i s/INSERT_ASSIGNED_HERE/$(ado_assigned_to)/ build/Fuzz/notifications-ado.json
displayName: Configure OneFuzz
- bash: |
onefuzz template libfuzzer basic --colocate_all_tasks --vm_count 1 --target_exe $target_exe_path --notification_config build/Fuzz/notifications-ado.json OpenConsole $test_name $(Build.SourceVersion) default
onefuzz template libfuzzer basic --colocate_all_tasks --vm_count 1 --target_exe $target_exe_path --notification_config @./build/Fuzz/notifications-ado.json OpenConsole $test_name $(Build.SourceVersion) default
displayName: Submit OneFuzz Job
env:
target_exe_path: $(Build.ArtifactStagingDirectory)/$(artifactName)/Fuzzing/x64/test/OpenConsoleFuzzer.exe
Expand Down
2 changes: 1 addition & 1 deletion doc/Niksa.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Given that we're using Xaml islands to host a modern UI and stitching a DirectX
Now, the obvious followup question is _"why can't you have one elevated connection in a tab next to a non-elevated connection?"_ This is where @sba923 should pick up reading (:smile:). I'm probably going to cover some things that you (@robomac) know already.
[2] When you have two windows on the same desktop in the same window station, they can communicate with eachother. I can use `SendKeys` easily through `WScript.Shell` to send keyboard input to any window that the shell can see.
[2] When you have two windows on the same desktop in the same window station, they can communicate with each other. I can use `SendKeys` easily through `WScript.Shell` to send keyboard input to any window that the shell can see.
Running a process elevated _severs_ that connection. The shell can't see the elevated window. No other program at the same integrity level as the shell can see the elevated window. Even if it has its window handle, it can't really interact with it. This is also why you can't drag/drop from explorer into notepad if notepad is running elevated. Only another elevated process can interact with another elevated window.
Expand Down
2 changes: 1 addition & 1 deletion doc/cascadia/Unittesting-CppWinRT-Xaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ this:
</ItemDefinitionGroup>
```

Again, verify the correct paths to your dependant C++/WinRT dlls, as they may be
Again, verify the correct paths to your dependent C++/WinRT dlls, as they may be
different than the above

#### Activating the manifest from TAEF
Expand Down
4 changes: 2 additions & 2 deletions doc/cascadia/profiles.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1761,7 +1761,7 @@
},
"useAcrylicInTabRow": {
"default": false,
"description": "When set to true, the tab row will have an acrylic background with 50% opacity.",
"description": "When set to true, the tab row will have an acrylic material background with 50% opacity.",
"type": "boolean"
},
"actions": {
Expand Down Expand Up @@ -2224,7 +2224,7 @@
},
"useAcrylic": {
"default": false,
"description": "When set to true, the window will have an acrylic background. When set to false, the window will have a plain, untextured background.",
"description": "When set to true, the window will have an acrylic material background. When set to false, the window will have a plain, untextured background.",
"type": "boolean"
}
},
Expand Down
2 changes: 1 addition & 1 deletion doc/specs/#1790 - Font features and axes-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Should not affect security.

### Reliability

Aside from additional parsing required for the settings file (which inherently offers more locations for parsing to fail), we need to be careful about badly formed/non-existant feature tags or axes specified in the user-defined dictionaries. We must make sure to ignore such declarations (perhaps alongside emitting a warning to the user) and only apply those that are correctly formed and exist.
Aside from additional parsing required for the settings file (which inherently offers more locations for parsing to fail), we need to be careful about badly formed/non-existent feature tags or axes specified in the user-defined dictionaries. We must make sure to ignore such declarations (perhaps alongside emitting a warning to the user) and only apply those that are correctly formed and exist.

### Compatibility

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ So `focusPane(target=1, direction=up)` will attempt to focus the pane above pane

> 👉 **NOTE**: At this point, the author considered "Do we even want a separate
> action to engage the tab switcher with panes expanded?" Perhaps panes being
> visible in the tab switcher is just part fo the tab switcher's behavior. Maybe
> visible in the tab switcher is just part of the tab switcher's behavior. Maybe
> there shouldn't be a separate "open the tab switcher with the panes expanded
> to the pane I'm currently on, and the panes listed in MRU order" action.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ following behaviors:
* `false`: If the current window is elevated, try to create a new unelevated
window to host this connection.
We could always re-introduce this setting, to supercede `elevate`.
We could always re-introduce this setting, to supersede `elevate`.
### Change profile appearance for elevated windows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@ elevated windows, when they trust the extension. We could have an additional set
of settings the user could use to enable certain extensions in elevated windows.
However, this setting cannot live in the normal `settings.json` or even
`state.json` (see [#7972], since those files are writable by any medium-IL
process. Instead, this setting would ned to live in a separate file that's
process. Instead, this setting would need to live in a separate file that's
protected to only be writable by elevated processes. This would ensure that an
attacker could not just add their extension to the list of white-listed
extensions. When the settings UI wants to modify that setting, it'll need to
Expand Down
2 changes: 1 addition & 1 deletion doc/specs/#6899 - Action IDs/#6899 - Action IDs.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This spec was largely inspired by the following diagram from @DHowett:
![figure 1](data-mockup.png)

The goal is to introduce an `id` parameter by which actions could be uniquely
refered to. If we'd ever like to use an action outside the list of `actions`, we
referred to. If we'd ever like to use an action outside the list of `actions`, we
can simply refer to the action's ID, allowing the user to only define the action
_once_.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def cloneGraph(oldSource, newSource, visited):
for old in oldSource.adj:

# Below check is for backtracking, so new
# nodes don't get initialized everytime
# nodes don't get initialized every time
if clone is None or(clone is not None and clone.key != old.key):
clone = Node(old.key, [])
newSource.adj.append(clone)
Expand Down
2 changes: 1 addition & 1 deletion doc/specs/TerminalSettings-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ VS needs to be able to persist settings just as a simple set of global settings.
When the application needs to retrieve these settings, they need to use them as a tripartite structure: frontend-component-terminal settings.

Each frontend will have its own set of settings.
Each component implementation will also ned to have some settings that control it.
Each component implementation will also need to have some settings that control it.
The terminal also will have some settings specific to the terminal.

### Globals and Profiles
Expand Down
2 changes: 1 addition & 1 deletion doc/specs/drafts/#1256 - Tab tearoff.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ There's a few areas to study here.

#### Communicating the launch
For the parameters passing, I see a few options:
1. `conhost.exe` can look up the package registration for `wt.exe` and call an entrypoint with arguments. This could be adapted to instead look up which package is registered as the default one instead of `wt.exe` for third party hosts. We would have to build provisions into the OS to select this, or use some sort of publically documented registry key mechanism. Somewhat gross.
1. `conhost.exe` can look up the package registration for `wt.exe` and call an entrypoint with arguments. This could be adapted to instead look up which package is registered as the default one instead of `wt.exe` for third party hosts. We would have to build provisions into the OS to select this, or use some sort of publicly documented registry key mechanism. Somewhat gross.
1. `conhost.exe` can call the execution alias with parameters. WSL distro launchers use this.
1. We can define a protocol handler for these sorts of connections and let `wt.exe` register for it. Protocol handlers are already well supported and understood both by classic applications and by packaged/modern applications on Windows. They must have provisions to communicate at least some semblance of argument data as well. This is the route I'd probably prefer. `ms-term://incoming/<session-id>` or something like that. The receiving `wt.exe` can contact the manager process (or set one up if it is the first) and negotiate receiving the session that was specified into a new tab.

Expand Down
2 changes: 1 addition & 1 deletion doc/specs/drafts/#997 Non-Terminal-Panes.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ is a bigger discussion than the feature at hand, however.
### Performance, Power, and Efficiency

decide to host a WebView in a pane, then it surely could impact these measures.
I don't believe this will have a noticable impact _on its own_. Should the user
I don't believe this will have a noticeable impact _on its own_. Should the user
However, I leave that discussion to the implementation of the actual alternative
pane content itself.

Expand Down
2 changes: 1 addition & 1 deletion samples/ConPTY/MiniTerm/MiniTerm/PseudoConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ internal static PseudoConsole Create(SafeFileHandle inputReadSide, SafeFileHandl
0, out IntPtr hPC);
if(createResult != 0)
{
throw new InvalidOperationException("Could not create psuedo console. Error Code " + createResult);
throw new InvalidOperationException("Could not create pseudo console. Error Code " + createResult);
}
return new PseudoConsole(hPC);
}
Expand Down
4 changes: 2 additions & 2 deletions samples/ReadConsoleInputStream/ReadConsoleInputStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public override int Read(byte[] buffer, int offset, int count)
if (record.EventType != Kernel32.EVENT_TYPE.FOCUS_EVENT)
{
// I assume success adding records - this is not so critical
// if it is critical to you, loop on this with a miniscule delay
// if it is critical to you, loop on this with a minuscule delay
_nonKeyEvents.TryAdd(record);
}
}
Expand Down Expand Up @@ -195,4 +195,4 @@ private void ValidateRead(byte[] buffer, int offset, int count)
if (!CanRead) throw new NotSupportedException("Get read not supported.");
}
}
}
}
2 changes: 1 addition & 1 deletion src/buffer/out/textBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1751,7 +1751,7 @@ const TextBuffer::TextAndColor TextBuffer::GetText(const bool includeCRLF,

if (copyTextColor)
{
// cant see CR/LF so just use black FG & BK
// can't see CR/LF so just use black FG & BK
COLORREF const Blackness = RGB(0x00, 0x00, 0x00);
selectionFgAttr.push_back(Blackness);
selectionFgAttr.push_back(Blackness);
Expand Down
7 changes: 3 additions & 4 deletions src/cascadia/TerminalApp/TerminalPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,7 @@ namespace winrt::TerminalApp::implementation
// - true if the ApplicationState should be used.
bool TerminalPage::ShouldUsePersistedLayout(CascadiaSettings& settings) const
{
return Feature_PersistedWindowLayout::IsEnabled() &&
settings.GlobalSettings().FirstWindowPreference() == FirstWindowPreference::PersistedWindowLayout;
return settings.GlobalSettings().FirstWindowPreference() == FirstWindowPreference::PersistedWindowLayout;
}

// Method Description:
Expand All @@ -317,7 +316,7 @@ namespace winrt::TerminalApp::implementation
// elevated window.
if (!_startupActions || IsElevated() || _shouldStartInboundListener)
{
// there arent startup actions, or we're elevated. In that case, go for it.
// there aren't startup actions, or we're elevated. In that case, go for it.
return false;
}

Expand Down Expand Up @@ -1220,7 +1219,7 @@ namespace winrt::TerminalApp::implementation
// message without vkey or scanCode if a user drags a tab.
// The KeyChord constructor has a debug assertion ensuring that all KeyChord
// either have a valid vkey/scanCode. This is important, because this prevents
// accidential insertion of invalid KeyChords into classes like ActionMap.
// accidental insertion of invalid KeyChords into classes like ActionMap.
if (!vkey && !scanCode)
{
return;
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalApp/TerminalTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,7 @@ namespace winrt::TerminalApp::implementation
selectedTabBrush.Color(color);

// currently if a tab has a custom color, a deselected state is
// signified by using the same color with a bit ot transparency
// signified by using the same color with a bit of transparency
auto deselectedTabColor = color;
deselectedTabColor.A = 64;
deselectedTabBrush.Color(deselectedTabColor);
Expand Down
7 changes: 2 additions & 5 deletions src/cascadia/TerminalControl/ControlCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -917,16 +917,13 @@ namespace winrt::Microsoft::Terminal::Control::implementation
return;
}

const auto dpi = (float)(scale * USER_DEFAULT_SCREEN_DPI);

const auto actualFontOldSize = _actualFont.GetSize();

auto lock = _terminal->LockForWriting();
_compositionScale = scale;

_renderer->TriggerFontChange(::base::saturated_cast<int>(dpi),
_desiredFont,
_actualFont);
// _updateFont relies on the new _compositionScale set above
_updateFont();

const auto actualFontNewSize = _actualFont.GetSize();
if (actualFontNewSize != actualFontOldSize)
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalControl/TermControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
// message without vkey or scanCode if a user drags a tab.
// The KeyChord constructor has a debug assertion ensuring that all KeyChord
// either have a valid vkey/scanCode. This is important, because this prevents
// accidential insertion of invalid KeyChords into classes like ActionMap.
// accidental insertion of invalid KeyChords into classes like ActionMap.
if (!vkey && !scanCode)
{
e.Handled(true);
Expand Down
5 changes: 0 additions & 5 deletions src/cascadia/TerminalSettingsEditor/Launch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,4 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation

return winrt::single_threaded_observable_vector(std::move(profiles));
}

bool Launch::ShowFirstWindowPreference() const noexcept
{
return Feature_PersistedWindowLayout::IsEnabled();
}
}
2 changes: 0 additions & 2 deletions src/cascadia/TerminalSettingsEditor/Launch.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
void CurrentDefaultProfile(const IInspectable& value);
winrt::Windows::Foundation::Collections::IObservableVector<IInspectable> DefaultProfiles() const;

bool ShowFirstWindowPreference() const noexcept;

WINRT_PROPERTY(Editor::LaunchPageNavigationState, State, nullptr);

GETSET_BINDABLE_ENUM_SETTING(FirstWindowPreference, Model::FirstWindowPreference, State().Settings().GlobalSettings().FirstWindowPreference);
Expand Down
3 changes: 0 additions & 3 deletions src/cascadia/TerminalSettingsEditor/Launch.idl
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ namespace Microsoft.Terminal.Settings.Editor
// https://github.com/microsoft/microsoft-ui-xaml/issues/5395
IObservableVector<IInspectable> DefaultProfiles { get; };


Boolean ShowFirstWindowPreference { get; };

IInspectable CurrentFirstWindowPreference;
IObservableVector<Microsoft.Terminal.Settings.Editor.EnumEntry> FirstWindowPreferenceList { get; };

Expand Down
3 changes: 1 addition & 2 deletions src/cascadia/TerminalSettingsEditor/Launch.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@

<!-- First Window Behavior -->
<local:SettingContainer x:Uid="Globals_FirstWindowPreference"
Style="{StaticResource ExpanderSettingContainerStyle}"
Visibility="{x:Bind ShowFirstWindowPreference}">
Style="{StaticResource ExpanderSettingContainerStyle}">
<muxc:RadioButtons AutomationProperties.AccessibilityView="Content"
ItemTemplate="{StaticResource EnumRadioButtonTemplate}"
ItemsSource="{x:Bind FirstWindowPreferenceList}"
Expand Down
Loading

1 comment on commit bfd8f73

@github-actions

This comment was marked as resolved.

Please sign in to comment.