! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Icons for slack "desktop" application not visible in the takslist buttons
Status:
RESOLVED: FIXED
Product:
Xfce4-panel
Component:
Window Buttons

Comments

Description Iharob Al Asimi 2019-05-31 16:11:01 CEST
Created attachment 8606 
Fixes slack's issue

This bug is not really a plugin's bug but it's a slack desktop bug. The _NET_WM_ICON is not set resulting in the fallback icon being rendered. I implemented a simple solution using the WM_CLASS instance name and the icon theme and it works like a charm. I guess that if grouping is enabled the issue wouldn't occur but I don't like grouping windows.

I wonder why libwnck doesn't solve this using a similar trick, on other desktops this issue doesn't occur yet it's logical to assume that probably every electron app doesn't set icons respecting standards (doesn't set icons period)
Comment 1 Andre Miranda editbugs 2019-06-17 01:25:17 CEST
Olivier simplified a lot xfwm4's patch (Bug 15510), the same can be accomplished for this one?
Comment 2 Simon Steinbeiss editbugs 2019-06-25 00:16:38 CEST
@Andre: The actual diff of this patch is very minimal already, it's just moving around a few lines.

I'm not sure I have a way to test this patch, but it looks sane. However I'll try to test it anyway and merge it.
Comment 3 Iharob Al Asimi 2019-06-25 05:23:31 CEST
Created attachment 8681 
Improved patch

This patch has an improvement over the other one. The old patch will cause no icon at all to be rendered if the icon is not found in the current theme.
Comment 4 Iharob Al Asimi 2019-06-25 05:26:03 CEST
Also, if icons are displayed in the tasklist plugin then the patch is not causing problems. So that's a simple way to test I think.
Comment 5 Simon Steinbeiss editbugs 2019-06-26 00:21:24 CEST
Created attachment 8684 
Cleaned up patch

I had a look at the patch now and first of all it seems functionally fine. I also installed the Slack app to be able to reproduce the problem and can confirm it's fixed.

I noticed several issues with the coding style, which I now fixed in my updated version. Functionally nothing has been changed though.
Comment 6 Simon Steinbeiss editbugs 2019-06-26 00:23:17 CEST
Created attachment 8685 
Cleaned up patch

Sry, uploaded a wrong version. Here goes the correct one.
Comment 7 Simon Steinbeiss editbugs 2019-06-26 00:26:42 CEST
Created attachment 8686 
Final cleaned up patch
Comment 8 Iharob Al Asimi 2019-06-26 13:21:47 CEST
Sorry about the coding style issues, I'll try to read your coding style guide next time.
Comment 9 Andre Miranda editbugs 2019-06-26 13:54:17 CEST
Created attachment 8687 
screenshot

It works well, thanks for the addition.
However I just noticed that just like on xfwm4's tabwin, the icon is a bit bigger than the others.
The purple icon on the screenshot is for an electron-based app (insomnia).
Comment 10 Iharob Al Asimi 2019-06-26 15:37:02 CEST
You are right! I think I can fix that too. I'll get back to you soon.
Comment 11 Simon Steinbeiss editbugs 2019-06-27 01:00:12 CEST
There is no explicit coding style guide for Xfce, it's implicitly in the source-code. So every contributor is expected to follow the coding style he/she finds in the source he/she edits.

I noticed one more thing apart from Andre's comment. While you take regular windows into account with xfce_tasklist_button_icon_changed you currently ignore grouped windows (xfce_tasklist_group_button_icon_changed).
Please integrate this part as well.

Thanks!
Comment 12 Iharob Al Asimi 2019-07-01 15:09:48 CEST
Created attachment 8712 
This is the final patch.

I fixed the size issue now, by just cloning fallback's icon size.

Regarding the group icon, I think no one reported that as a problem and actually I recall reading somewhere that it was a workaround to enable groupping which I don't like so I didn't even try that.

Let me know if there's something else I can do.

BTW: I also have 2 plugins for the panel that I wrote a while ago. If I wanted to upload them somewhere, where would that be?
Comment 13 Simon Steinbeiss editbugs 2019-07-02 11:58:03 CEST
Thanks for updating the patch, but please keep this in mind for next time:
- It seems you reworked your patch based on your version, not on my cleaned up version... :/
- Also, please provide git patches since you seem to know what you're doing. Otherwise the integrator (in this case: me) has to create the patch and extract your name and email address from bugzilla.


Regarding your panel plugins: there is no fixed process (I think), but I suggest you post information (and hyperlink to the code) about your plugins to the dev mailing list and request for them to get repos in git.xfce.org.
Comment 14 Git Bot editbugs 2019-07-02 11:58:20 CEST
Iharob Al Asimi referenced this bugreport in commit 2fbd44f3dc936c79ac145f458259807df9efe424

tasklist: Add fallback for missing window icons (Bug #15511)

https://git.xfce.org/xfce/xfce4-panel/commit?id=2fbd44f3dc936c79ac145f458259807df9efe424

Bug #15511

Reported by:
Iharob Al Asimi
Reported on: 2019-05-31
Last modified on: 2019-07-02

People

Assignee:
Simon Steinbeiss
CC List:
2 users

Version

Version:
Unspecified

Attachments

Fixes slack's issue (2.46 KB, patch)
2019-05-31 16:11 CEST , Iharob Al Asimi
no flags
Improved patch (2.88 KB, patch)
2019-06-25 05:23 CEST , Iharob Al Asimi
no flags
Cleaned up patch (2.99 KB, patch)
2019-06-26 00:21 CEST , Simon Steinbeiss
no flags
Cleaned up patch (2.99 KB, patch)
2019-06-26 00:23 CEST , Simon Steinbeiss
no flags
Final cleaned up patch (2.98 KB, patch)
2019-06-26 00:26 CEST , Simon Steinbeiss
no flags
screenshot (155.78 KB, image/png)
2019-06-26 13:54 CEST , Andre Miranda
no flags
This is the final patch. (2.27 KB, patch)
2019-07-01 15:09 CEST , Iharob Al Asimi
no flags

Additional information