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
Make sure RIS re-enables win32 input and focus events #15476
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 not sure if you'll be happy with using a regex here, if that's going to add bloat to conhost. It looks to me like we're already using regex searches in the
TextBuffer
, but I'm not sure if that actually gets linked into conhost.Worst case, we could make this only ignore the defunct
--win32input
option, but I thought it would be nice to have it dropping all the unsupported args, since there was already a TODO for that a few lines down from here.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.
It's not linked into conhost as far as I know. I personally would like to replace it with ICU in the future so that we can get proper Unicode aware regex queries. ICU is also significantly faster, like in the order 10-100x. It can go through the entire 120x9001 text buffer full of enwik8 in <3ms with a worst-case query like
e
(or some other common ASCII character).Is there any reason to not just check if the
arg
starts with--
and then ignore it? What other arguments could start with--
and not be followed by a-z0-9?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.
This, I am somewhat worried about. We go from explicitly rejecting unknowns to explicitly accepting them...
Since conpty.dll and openconsole.exe ship in lock-step, I would be comfortable just yanking all support for the argument and the special flag and everything. :)
After all . . . it never made it up to our public API surface on Windows!
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.
This got me thinking, and I'd be interested in what you and Leonard and @zadjii-msft think.
This is speculative and not for this PR.
"In the future", we might want to add more types of conpty flags. Maybe. I don't love it, but maybe we will.
Mike and Michael used to prefer
--real --arguments
that set flags, rather than--flags 0xABCD
to bulk enable all of0xABCD
. The argument was that it was easier spot in a debugger or a process list.I still think there's value in having
--flags 0xABCD
, but this PR made me realize that maybe what we actually want is--flags.required 0x0001 --flags.optional 0x0002
. Conforming versions of conhost can say, "I don't support flag 0x0001" if0x0001
is too new for their blood... but they can ignore0x0002
if they don't know what it is.Is that YAGNI?
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.
That was actually my first attempt, but it caused this test case to fail:
terminal/src/host/ut_host/ConsoleArgumentsTests.cpp
Line 113 in c9e993a
So then I thought I should maybe also check that the arg contained no spaces, but that still caused this test to fail:
terminal/src/host/ut_host/ConsoleArgumentsTests.cpp
Line 182 in c9e993a
And that's when I figured I'd need to go with a regex.
But maybe those test cases aren't really something we need to support. I don't know.
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.
Fffffair, and sorry I didn't answer it at first. My official stance is, "we haven't built the conpty API for use without conpty.dll"; if somebody is invoking it directly and passing their own pipes, they are allowed to keep the pieces when it breaks.
The command line args are effectively an internal interface. Technically. I know somebody's caught us out for breaking them before, but that's because they were setting "
conhost --pty
" as their debugger to stop certain Windows processes from starting . . .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.
OK, that's just me not understanding how it works - that seems reasonable. But do I keep the
PSEUDOCONSOLE_WIN32_INPUT_MODE
flag, and just not do anything with it, or should that be nuked as well?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.
Ah, it would be fine for you to remove that flag in its entirety. :)
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.
That's the other half of the equation. We haven't made a publicly supported API-stable release of ConPTY's new undocked interface, so anybody using it is taking on
0.x
version level support. I'm happy to be the one with whom the buck stops if they come to ask!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 think this is done now. I've dropped the regex test for the invalid args, and removed all the
--win32input
command line parameters as well as thePSEUDOCONSOLE
flag. Everything still appears to work.