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

workaround for icons not rendered for apps existing before waybar launch #3393

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

RobertMueller2
Copy link
Contributor

@RobertMueller2 RobertMueller2 commented Jun 30, 2024

This is a workaround for #3366 .

Using gdb, I can see that handle_app_id can sometimes run when tbar_->icon_themes() has 0 elements. This happens in multi output settings and can result in empty icons for apps that have been started before waybar.

It looks to me that the Tasks can be present before Taskbar::Taskbar has run, I could also confirm this by temporarily setting a bool flag in the constructor. If anyone can, I would appreciate any more detailed explanation why that is even possible, because I don't understand it at all.

With an explanation there's probably better ways to do this. :) But the code in this PR addresses this by setting the app_ids for all of the taskbar's tasks again at the end of Taskbar's constructor, leading to another icon lookup with icon_themes() available for handle_app_id.

@Alexays Alexays merged commit 494cedb into Alexays:master Jul 1, 2024
9 checks passed
@Alexays
Copy link
Owner

Alexays commented Jul 1, 2024

LGTM

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.

2 participants