-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Terminal doesn't respect "start /max" and "/min" parameters when running a console app as default terminal #12154
Comments
Alright, so there are three elements here. From the bottom up:
We may need to pass some blob of parameters to defterm invocations describing how the terminal application should be launched. That might take care of both Lemme add @miniksa, see what he thinks (fat fingered enter, sorry about that) |
Without knowing the details of what's possible, I'd expect Terminal to honor relevant fields in I understand skipping the handoff to Terminal if |
I get doing But for the other ones related to sizing and visibility... I think what I'd do is... if the inbound connection specified any of those, I'd ensure the monarch/peasant granted them a fresh window to manipulate however they specified without tampering with the user's existing window. So they can only "join" automatically if they're not going to mess with what is existing and are flexible with the layout.
This was just a matter of scoping it. You're right, Terminal doesn't support |
Brief notes from 1-1:
so OpenConsole can read the startup info, without rev'ing the defterm interface. We know this works because the OpenConsole does get the title from the STARTUPINFO, so OpenConsole does get that info somehow. Rev'ing Verbatims
Todo's
Notes
|
This PR by itself doesn't _really_ change much. Technically, now the Terminal will respect the Title of a `.lnk` when started for defterm, but we don't do anything else yet. Primarily, the goal of this PR is to just wire up startup info in OpenConsole to the connected Terminal. * This required a bit of changes in `srvinit.cpp:ConsoleEstablishHandoff` to replicate other bits of startup, where we crack open the connect message to get the relevant bits of info. * We pack that all into a `TERMINAL_STARTUP_INFO`, which we pass along to the registered terminal application. * `ConptyConnection` accepts the handoff, and gathers that information out of the `TERMINAL_STARTUP_INFO` * Some other updates to the scratch sln were made to make it build again (related, but unimportant). * This is a precursor to: * #13111 * #12154 * Closes #9458 * Tested manually * I work here
This PR by itself doesn't _really_ change much. Technically, now the Terminal will respect the Title of a `.lnk` when started for defterm, but we don't do anything else yet. Primarily, the goal of this PR is to just wire up startup info in OpenConsole to the connected Terminal. * This required a bit of changes in `srvinit.cpp:ConsoleEstablishHandoff` to replicate other bits of startup, where we crack open the connect message to get the relevant bits of info. * We pack that all into a `TERMINAL_STARTUP_INFO`, which we pass along to the registered terminal application. * `ConptyConnection` accepts the handoff, and gathers that information out of the `TERMINAL_STARTUP_INFO` * Some other updates to the scratch sln were made to make it build again (related, but unimportant). * This is a precursor to: * #13111 * #12154 * Closes #9458 * Tested manually * I work here (cherry picked from commit 7e47f6a) Service-Card-Id: 86230565 Service-Version: 1.15
…enabled (#14222) ## Summary of the Pull Request - Pipe the `ShowWindow` value through to `ConptyConnection` - When `TerminalPage` receives the new connection, it checks the `ShowWindow` value and maximizes *IF* there were no other pre-existing tabs (in glomming mode, we don't want to maximize sessions that did not ask for it) ## References #12154 ## PR Checklist * [ ] Closes #xxx * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [ ] Schema updated. * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx ## Detailed Description of the Pull Request / Additional comments This is just a temporary solution until we change our defterm handoff process. Because of the way the process currently works, we have no way of knowing that the connection has requested the window to be maximized until after we have already started a terminal session. This means that we have to manually maximize the window upon receiving the connection, instead of having the session _start_ maximized, as it probably should. ## Validation Steps Performed `start /max python` with defterm enabled opens up python in a maximized WT window
…enabled (#14222) ## Summary of the Pull Request - Pipe the `ShowWindow` value through to `ConptyConnection` - When `TerminalPage` receives the new connection, it checks the `ShowWindow` value and maximizes *IF* there were no other pre-existing tabs (in glomming mode, we don't want to maximize sessions that did not ask for it) ## References #12154 ## PR Checklist * [ ] Closes #xxx * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [ ] Schema updated. * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx ## Detailed Description of the Pull Request / Additional comments This is just a temporary solution until we change our defterm handoff process. Because of the way the process currently works, we have no way of knowing that the connection has requested the window to be maximized until after we have already started a terminal session. This means that we have to manually maximize the window upon receiving the connection, instead of having the session _start_ maximized, as it probably should. ## Validation Steps Performed `start /max python` with defterm enabled opens up python in a maximized WT window (cherry picked from commit 85ca8f5) Service-Card-Id: 87207152 Service-Version: 1.16
I'm leaning towards closing this out with the combo of #14222 and #13838. We can pass the startup info into the Terminal now, but I'm reluctant to change the behavior where defterm filters out |
Windows Terminal version
1.11.3471.0
Windows build number
10.0.22000.434
Other Software
Seemingly any console application (cmd, powershell, python, batch file) -- I'm using python as an example here.
Steps to reproduce
Expected Behavior
New window starts maximised, as it does when the default Windows console is set.
The correct behaviour also happens if you run wt.exe itself, i.e. "start /max wt python"
Actual Behavior
New window starts windowed
The text was updated successfully, but these errors were encountered: