-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combine progress states in the tab, taskbar #10755
Conversation
…rogress value correctly
… at once. Not sure I love it.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
@@ -690,37 +709,39 @@ namespace winrt::TerminalApp::implementation | |||
// - <none> | |||
void TerminalTab::_UpdateProgressState() | |||
{ | |||
if (const auto& activeControl{ GetActiveTerminalControl() }) | |||
const auto state{ GetCombinedTaskbarState() }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gentle nit: we could compute the "max state" one time and store it, here, because this is the listener for all progress state changes (right?). That would make the call in TerminalPage free (it wouldn't need to min_element
the group of winrt objects)
🎉 Handy links: |
Summary of the Pull Request
This PR causes the Terminal to combine taskbar states at the tab and window level, according to the MSDN docs for
SetProgressState
.This allows the Terminal's taskbar icon to continue showing progress information, even if you're in a pane/tab that doesn't have progress state. This is helpful for cases where the user may be running a build in one tab, and working on something else in another.
References
SetProgressState
PR Checklist
Detailed Description of the Pull Request / Additional comments
This also fixes a related bug where transitioning from the "error" or "warning" state directly to the "indeterminate" state would cause the taskbar icon to get stuck in a bad state.
Validation Steps Performed
progress.cmd