-
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
Wrong icon gets rendered when directly running apps in terminal (double click exe to open terminal tab). #13111
Comments
Huh. Coulda swore we were tracking this somewhere, but doesn't look like it. #10669 looks vaguely related, but that's not it. For this to work, we'd probably need to some set of:
we need to both be able to get the info on what the icon was supposed to be, and the ability to turn icons in dll's and exe's into XAML icons. |
Cant one use the Windows API to obtain the icon information from the program that terminal is about to run (when it determines the program is about to execute directly) in order to use that information to simulate a profile with the icon? edit: something like https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-loadimagew |
Yea probably. Trick there is converting the |
@zadjii-msft I'm comfortable calling this a dupe of both of those issues. The description for "pass LNK/EXE data" suggests making a fake runtime profile for the handed-off application, and part of that would be making sure it's got the right icon. We do both, we get icons! |
Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
(Thanks for the report @AraHaan!) |
On Winforms what I do is convert the HANDLE to an System.Drawing.Icon, and then convert the icon to an Bitmap, use the bitmap and icon for what I needed. I guess here could do something similar but have the bitmap saved to an temp bitmap file then try loading it as an XAML icon? |
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
Windows Terminal version
1.13.10984.0
Windows build number
10.0.22000.0
Other Software
My Discord Bot v2.1.100.
On my Discord bot, it is designed to have an application icon. However when Windows Terminal is configured to be the default console host, all terminal tabs do not render the application icon when you directly double click it's executable file to run it.
Steps to reproduce
Expected Behavior
For the icon of the application to be rendered on the tab. On MacOS it renders the icon just fine, however that is in Apple's terminal.
Actual Behavior
A different icon is rendered and is provided from the OS or some other application instead?
The text was updated successfully, but these errors were encountered: