Add support for OSC777 (Send Notification)#20012
Add support for OSC777 (Send Notification)#20012carlos-zamora wants to merge 7 commits intodev/cazamor/toast/basefrom
Conversation
| const auto title = parts.size() >= 2 ? til::at(parts, 1) : std::wstring_view{}; | ||
| const auto body = parts.size() >= 3 ? til::at(parts, 2) : std::wstring_view{}; | ||
| _api.ShowNotification(title, body); | ||
| } |
There was a problem hiding this comment.
After #20009 merged yesterday, I think this now needs an:
else
{
_api.UnknownSequence();
}There was a problem hiding this comment.
Good catch. I never would've caught this haha
There was a problem hiding this comment.
Do we need another one of those here?
terminal/src/terminal/adapter/adaptDispatch.cpp
Lines 3854 to 3857 in 34b985d
There was a problem hiding this comment.
Another one? What do you mean? But we should probably move the check down into the if (action == L"notify") block. That of course means that there's some redundant work we do if it's disabled, but... that'd only matter if we process >100s of these per second and I don't think we will.
| { | ||
| _dispatch->DoDesktopNotification(string); | ||
| break; | ||
| } |
There was a problem hiding this comment.
FWIW, you can drop those braces here.
4357c17 to
aeb531f
Compare
2f5763e to
34b985d
Compare
This comment has been minimized.
This comment has been minimized.
34b985d to
7ea4f2f
Compare
This comment has been minimized.
This comment has been minimized.
7a378e1 to
33546f1
Compare
Summary of the Pull Request
targets #20010
This adds support for the
OSC 777 ; notify ; title ; body STsequence. This allows client applications to send a notification to the Terminal. When this notification is clicked, it summons the terminal window that sent it.Validation Steps Performed
PR Checklist
Heavily based on #19938
Co-authored by @zadjii-msft