Skip to content
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 Preview and Terminal have the same icon in Alt-Tab and Win-Tab window switchers #6777

Closed
metathinker opened this issue Jul 3, 2020 · 5 comments · Fixed by #7971
Closed
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@metathinker
Copy link
Contributor

Environment

Windows build number: Windows 10 ver. 2004 build 19041.329
Windows Terminal version (if applicable): 1.0.1811.0, Preview 1.1.1812.0

Steps to reproduce

  1. Open Windows Terminal.
  2. Open Windows Terminal Preview.
  3. Press Alternate-Tab or Windows-Tab.

Expected behavior

The Terminal and Terminal Preview windows thumbnails have different icons displayed next to their titles.

Actual behavior

The Terminal and Terminal Preview windows thumbnails have the same displayed next to their titles.
(Taskbar shows different icons as expected.)
Windows-Tab screenshot showing Windows Terminal and Windows Terminal Preview with the same icons

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jul 3, 2020
@KalleOlaviNiemitalo
Copy link

KalleOlaviNiemitalo commented Jul 5, 2020

(Taskbar shows different icons as expected.)

That is true in two cases:

  • If Windows Terminal Preview is pinned to the task bar and not running.
  • If, in the taskbar settings, "Combine taskbar buttons" is "Always, hide labels"

However, if Windows Terminal Preview 1.1.1812.0 is running and "Combine taskbar buttons" is "Never", then the icon in the taskbar button lacks the blue preview marker, just like the icon in Alt-Tab.

I assume correcting the Windows Terminal Preview icon in Alt-Tab would fix the icon in the taskbar button as well, so I am not filing that as a separate issue. (Alternatively, #6556 would make the taskbar icon not depend on the application icon.)

@jtippet
Copy link
Contributor

jtippet commented Jul 8, 2020

I believe there are two possible fixes:

  • Fix the OS shell to prefer the MRT icon instead of preferring the win32 icon
  • Add alternate versions of /res/terminal.ico

The 1st fix is clearly better, since it benefits any hybrid app. But the 2nd fix is much easier, since it'd just take about an hour to gin up a new .ico file and hack the .RC file to refer to it when building the preview flavor.

@metathinker
Copy link
Contributor Author

metathinker commented Jul 8, 2020

  • Fix the OS shell to prefer the MRT icon instead of preferring the win32 icon

For the benefit of people outside Microsoft or the Windows org:

"MRT" is the internal name for the Modern Resource Technology, or the Resource Management System as it is referred to on docs.microsoft.com. It is the system for adding and loading text string, image, and file resources to a Universal Windows Platform app or other MSIX-packaged app (including Desktop Bridge apps like Terminal), and for choosing the right resource to use depending on things like the user's language and system color choices, tile sizes, and the screen's scale factor.

Basically, if your MSIX-packaged desktop app's image resources are separate files or even separate MSIX packages, they may be loaded by MRT. If they're embedded in the .exe, they're the old-fashioned Win32 resources Mr. Tippet is referring to.

@DHowett
Copy link
Member

DHowett commented Jul 8, 2020

So, I’m not averse to having a separate preview icon in the EXE file, but right now there are no compiled artifact differences between Release and Preview, only packaging and livery.
Is there something we could do by having all the resources in the executable and setting the window icon to one of them based on PFN?

@DHowett DHowett added Area-User Interface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. labels Jul 8, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jul 8, 2020
@DHowett DHowett removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Jul 8, 2020
@DHowett DHowett added this to the Terminal v2.0 milestone Jul 8, 2020
DHowett added a commit that referenced this issue Oct 20, 2020
This commit introduces 8 more variants of the .ICO file, embeds them
into WindowsTerminal.exe, and adds code that will select the most
appropriate icon at runtime.

Since we're a Centennial application, the "application" icon inside our
package isn't used by the shell for the taskbar thumbnails or the
Alt-Tab window.

To quote J. Tippet,
> I believe there are two possible fixes:
>
> 1. Fix the OS shell to prefer the MRT icon instead of preferring the
>    win32 icon
> 2. Add alternate versions of /res/terminal.ico
> The 1st fix is clearly better, since it benefits any hybrid app. But
> the 2nd fix is much easier, since it'd just take about an hour to gin up
> a new .ico file and hack the .RC file to refer to it when building the
> preview flavor.

... and to quote M. Ratanapintha,

> Basically, if your MSIX-packaged desktop app's image resources are
> separate files or even separate MSIX packages, they may be loaded by
> MRT. If they're embedded in the .exe, they're the old-fashioned Win32
> resources Mr. Tippet is referring to.

This is the "2nd fix."

Fixes #6777
@ghost ghost added the In-PR This issue has a related PR label Oct 20, 2020
DHowett added a commit that referenced this issue Oct 21, 2020
This commit introduces 8 more variants of the .ICO file, embeds them
into WindowsTerminal.exe, and adds code that will select the most
appropriate icon at runtime.

Since we're a Centennial application, the "application" icon inside our
package isn't used by the shell for the taskbar thumbnails or the
Alt-Tab window.

To quote J. Tippet,
> I believe there are two possible fixes:
>
> 1. Fix the OS shell to prefer the MRT icon instead of preferring the
>    win32 icon
> 2. Add alternate versions of /res/terminal.ico
> The 1st fix is clearly better, since it benefits any hybrid app. But
> the 2nd fix is much easier, since it'd just take about an hour to gin up
> a new .ico file and hack the .RC file to refer to it when building the
> preview flavor.

... and to quote M. Ratanapintha,

> Basically, if your MSIX-packaged desktop app's image resources are
> separate files or even separate MSIX packages, they may be loaded by
> MRT. If they're embedded in the .exe, they're the old-fashioned Win32
> resources Mr. Tippet is referring to.

This is the "2nd fix."

Fixes #6777
@ghost ghost closed this as completed in #7971 Oct 28, 2020
@ghost ghost added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Oct 28, 2020
ghost pushed a commit that referenced this issue Oct 28, 2020
This commit introduces 8 more variants of the .ICO file, embeds the
right ones into WindowsTerminal.exe, and adds code that will select the
most appropriate icon at runtime.

Since we're a Centennial application, the "application" icon inside our
package isn't used by the shell for the taskbar thumbnails or the
Alt-Tab window.

To quote J. Tippet,
> I believe there are two possible fixes:
>
> 1. Fix the OS shell to prefer the MRT icon instead of preferring the
>    win32 icon
> 2. Add alternate versions of /res/terminal.ico
> The 1st fix is clearly better, since it benefits any hybrid app. But
> the 2nd fix is much easier, since it'd just take about an hour to gin up
> a new .ico file and hack the .RC file to refer to it when building the
> preview flavor.

... and to quote Michael Ratanapintha,

> Basically, if your MSIX-packaged desktop app's image resources are
> separate files or even separate MSIX packages, they may be loaded by
> MRT. If they're embedded in the .exe, they're the old-fashioned Win32
> resources Mr. Tippet is referring to.

This is the "2nd fix."

Fixes #6777

Co-authored-by: Jeffrey Tippet <[email protected]>
@ghost
Copy link

ghost commented Nov 11, 2020

🎉This issue was addressed in #7971, which has now been successfully released as Windows Terminal Preview v1.5.3142.0.:tada:

Handy links:

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants