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

Guess png dimention by file header #126

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jj1uzh
Copy link
Contributor

@jj1uzh jj1uzh commented Oct 29, 2021

Current version guesses PNG icons of some applications (e.g. Slack Desktop) to have size 1x1 because they are not in *x* directories.
Guess the size of such icons by PNG header.

@sagb
Copy link
Owner

sagb commented Nov 9, 2021

I tried to avoid reading icon content at startup, because it possibly may cause fatal delay in some cases, for example, when /usr or home mounted over nfs.
Instead, inspectIconMeta is supposed to set 1x1 to indicate unknown size. Then, selection procedure will choose this icon if no other icons are found. Then, during runtime, only if some window match this icon, loadIconContentPNG actually reads the file.
Is this approach broken?

@martinlowet
Copy link

Is this approach broken?

It sounds good, however it currently doesn't seem to work, at least not with vscodium, which stores it's icon at /usr/share/pixmaps/vscodium.png. With this PR the problem disappears.

@sagb
Copy link
Owner

sagb commented Feb 9, 2024

So, why didn't my approach work? Perhaps you had other icons for VSCodium, which AltTab chose instead of the desired one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants