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

Problems with Servo icon in Windows taskbar #16326

Closed
atouchet opened this issue Apr 10, 2017 · 7 comments
Closed

Problems with Servo icon in Windows taskbar #16326

atouchet opened this issue Apr 10, 2017 · 7 comments
Labels

Comments

@atouchet
Copy link
Contributor

@atouchet atouchet commented Apr 10, 2017

When running Servo in Windows 10 the taskbar icon does not always display properly. Sometimes it is displayed properly, sometimes it is displayed with graphical artifacts, and sometimes it does not load at all.

Example cases:

Windows Servo Icon

The Servo icon displayed properly.

Windows Servo Icon

The Servo icon displayed with graphical artifacts. I have seen two variations so far, one with black splotches in the image (pictured) and another that shows a black square in the middle of the icon image.

Windows Servo Icon

The Servo icon not being loaded at all.

@atouchet atouchet mentioned this issue Apr 10, 2017
11 of 11 tasks complete
@jdm jdm added the P-windows label Apr 10, 2017
@atouchet
Copy link
Contributor Author

@atouchet atouchet commented Apr 10, 2017

This may be improved/fixed by #11969.

@Coder206
Copy link
Contributor

@Coder206 Coder206 commented Apr 11, 2017

@atouchet I have been able to reproduce this (as #11969 shows). However, it only appears for me when I run Servo with mach.bat build [-d|-r]. When I run it from the target directory, it looks fine.

UPDATE: Only the .ico from the debug target works, the release is still corrupted.

@jonathandturner
Copy link

@jonathandturner jonathandturner commented Apr 12, 2017

Huh, do we know why the release one is having problems?

Also what are the steps to repro? I'll be putting the nightly through it's paces once the last two issues are resolved to see if it's ready to go live very soon, maybe as soon as tomorrow.

@atouchet
Copy link
Contributor Author

@atouchet atouchet commented Apr 12, 2017

I haven't found a consistent way to reproduce this issue yet. I can load the exact same build and get different results at different times.

@codec-abc
Copy link

@codec-abc codec-abc commented Apr 12, 2017

In my experience there is 2 ways to set up an icon in Windows. The first is to set it a build time. I am no expert but there I think it end in the IMAGE_RESOURCE_DIRECTORY_ENTRY region of the Portable Executable (PE) header of the exe file. The second method is to set it dynamically at run-time using the Windows API. Contrary to Firefox, it seems that Servo use the 2nd method. I can tell that because when looking in the explorer the exe file of Firefox has an icon while Servo has the default executable icon. From my experience in C# doing Winform app, the 1st method give cleaner result. I did the 2nd method once and while I had always the icon, there was some pixel aliasing issue. So, I guess there is some mip-mapping in the PE header allowing windows to display it nicely and when given an icon at run-time Windows would scale it on fly with poor result.

TLDR: It would be better if the icon was embedded in the icon at build time instead of being loaded at runtime.

@atouchet atouchet changed the title Problems With Servo Icon in Windows Taskbar Problems With Servo icon in Windows taskbar Apr 18, 2017
@atouchet atouchet changed the title Problems With Servo icon in Windows taskbar Problems with Servo icon in Windows taskbar Apr 18, 2017
@atouchet
Copy link
Contributor Author

@atouchet atouchet commented Jul 31, 2017

I should maybe also note that the issue in the original post is in regards to the installer version of Servo. The standalone ZIP version does not load the icon at all.

@atouchet
Copy link
Contributor Author

@atouchet atouchet commented Mar 19, 2018

This was fixed in #20316.

@atouchet atouchet closed this Mar 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.