Visually we use the icon in the panel's window buttons to easily find the application, even more importantly when the buttons dont have labels, and with thunar constantly changing the icon when it is on a folder which has a custom folder icon, this makes things very difficult to do. This has annoyed me for some time and i just read a review saying the same thing, so that was the perfect time to remember to file it. :D "One detail that I didn't like - the Thunar window button (when shown without text) changes to match the content, like Documents, Downloads, Pictures, etc, and I found this somewhat confusing, especially on the default-size panel." - https://www.dedoimedo.com/computers/xubuntu-ermine.html
So i checked other file managers these dont change their window icon and they are Nautilus Dolphin PCManFM Windows Explorer - Windows XP Windows Explorer - Windows 8 and these file managers do change their window icon Caja Nemo Windows Explorer - Windows 7 Windows Explorer - Windows 10 Theo provided the below as a pointer for the change and said that it would be another candidate for a hidden xfconf setting. https://git.xfce.org/xfce/thunar/tree/thunar/thunar-window.c#n3456 If it is decided that this behaviour should be switchable by a xfconf setting, I would suggest that the default behaviour should be that it doesn't change. Imagine if every app changed its window icon based on context. If firefox used a website's icon as the window icon depending on which tab you are in. If mousepad, libreoffice, vlc, etc. used the file's filetype icon as the window icon.
Thanks for reporting it ! Yes, it would be nice to have a xfconf setting for it. And yes, I agree that the default should be to only show the generic folder icon. (Or possibly Thor's Hammer ? I would prefer a generic folder icon) As always, patches would be very welcome ! (Hope I will have time to work on my xfce email backlog this weekend)
Created attachment 9540 patch Compiled it and it worked.
Created attachment 9541 patch with fixed comment
Thanks ! Works like a charm. Though I dont understand why you modified "thunar-list-model.c". You can revert the changes there, and it still works fine. Possibly added to the patch by accident ? If somebody wants to test: xfconf-query --channel thunar --property /misc-change-window-icon --create --type bool --set false xfconf-query --channel thunar --property /misc-change-window-icon --create --type bool --set true After pushing, we have to keep in mind to add the new setting to https://docs.xfce.org/xfce/thunar/hidden-settings
Created attachment 9543 final patch
Note that 3 spaces were used for indentation here: + if (G_UNLIKELY (change_window_icon)) + gtk_window_set_icon_name (GTK_WINDOW (window), icon_name);
Yousuf Philips referenced this bugreport in commit 7ea02968b73bd39e4d4c59071d4ace1d8aa6b1de Xfconf setting whether to change the window icon (bug #16501) https://git.xfce.org/xfce/thunar/commit?id=7ea02968b73bd39e4d4c59071d4ace1d8aa6b1de
(In reply to Theo Linkspfeifer from comment #7) > Note that 3 spaces were used for indentation Fixed and pushed to master Thanks alot for your contribution, Jay !
Glad to help. Thanks Theo for the code pointer.
Andre Miranda referenced this bugreport in commit e3b560e1866ae74b9a8e9de6146424c59f0b937b Make change window icon opt-out (Bug #16501) https://git.xfce.org/xfce/thunar/commit?id=e3b560e1866ae74b9a8e9de6146424c59f0b937b
Alexander Schwinn referenced this bugreport in commit 498ade50786698c342d083449fc77a9f0d76b3be move setting to to use current folder icon as window icon to the 'display' tab (Bug #16501) https://git.xfce.org/xfce/thunar/commit?id=498ade50786698c342d083449fc77a9f0d76b3be
*** Bug 15393 has been marked as a duplicate of this bug. ***