-
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
Implement ConEmu's OSC 9;4 to set the taskbar progress indicator #8055
Conversation
|
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.
I'm blocking mostly over the 3
thing, but there's still a bunch to do on this PR so I guess this block is mostly for show
bc11ad9
to
606490f
Compare
@@ -29,6 +29,7 @@ Module Name: | |||
#include <cstring> | |||
#include <shellscalingapi.h> | |||
#include <windowsx.h> | |||
#include <ShObjIdl.h> |
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.
Do we really want to add this to pch.h
? Personally I try to avoid adding things into PCH because the damage it does to compiling speed.
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.
meh, this one's not so bad. We'll probably end up using it in other places across the project, and I'd rather eat the compile time once in the pch phase rather than many times across rebuilds.
It's the winrt headers that really chew up pch time 😑
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.
Wow these are such nits for something that works so well and I'm so excited about
@@ -29,6 +29,7 @@ Module Name: | |||
#include <cstring> | |||
#include <shellscalingapi.h> | |||
#include <windowsx.h> | |||
#include <ShObjIdl.h> |
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.
meh, this one's not so bad. We'll probably end up using it in other places across the project, and I'd rather eat the compile time once in the pch phase rather than many times across rebuilds.
It's the winrt headers that really chew up pch time 😑
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.
I REALLY want to sign off on this. I think it's ready to go, save for two things:
- make sure the
pfn
isn't nullptr inTerminalApi.cpp
- Maybe add tests to
UnitTests_TerminalCore
? We've got tests inScreenBufferTests.cpp
that write VT sequences to the buffer and make sure that the state of theSCREEN_INFORMATION
in conhost is updated as we'd expect, maybe we should add something similar here?
…state and progress params
ohh noo there's another size_t <- uint64 conversion issue in AppHost. Might be easiest to try to build the x86 version locally. |
## Summary of the Pull Request Does what the title says. Now while you're building terminal projects, the taskbar will show indeterminate progress. If the build fails, it'll blink the error state for 500ms before returning to normal. ## References * Made possible by #8055 _and viewers like you_ ## PR Checklist * [x] scratches an itch I've had since at least 2018 * [x] I work here * [x] this is a build script ## Validation Steps Performed tested manually
…8335) ## Summary of the Pull Request Does what the title says. Now while you're building terminal projects, the taskbar will show indeterminate progress. If the build fails, it'll blink the error state for 500ms before returning to normal. ## References * Made possible by microsoft#8055 _and viewers like you_ ## PR Checklist * [x] scratches an itch I've had since at least 2018 * [x] I work here * [x] this is a build script ## Validation Steps Performed tested manually
I must be missing something. I'm running Windows Terminal 1.4.3243.0, and this (PowerShell 7.1.1, FWIW) doesn't do anything:
RTFM answers kindly accepted 😋 |
@sba923, this feature is on the release-1.6 branch, but not on the release-1.4 and release-1.5 branches. |
Phew. I haven't gone mad after all. I just need to be patient 😉 or build myself a 1.6 binary. |
I don't have to wait anymore thanks to v1.6.10272.0 Preview |
The terminal will show a "Indeterminate" state progress while the server is starting See microsoft/terminal#8055 for more info
This commit implements the OSC 9;4 sequence per the ConEmu style.
ESC ] 9 ; 4 ; st ; pr ST
st
is:0
: remove progress.1
: set progress value topr
(number, 0-100).2
: set the taskbar to the "Error" state3
: set the taskbar to the "Indeterminate" state4
: set the taskbar to the "Warning" stateWe've also extended this with:
We handle multiple tabs sending the sequence by using the the last focused
control's taskbar state/progress.
Upon receiving the sequence in
TerminalApi
, we send an event that gets caughtby
TerminalPage
.TerminalPage
then fires another event that gets caught byAppHost
and that's where we set the taskbar progress.Closes #3004