Created attachment 5451 diff file for tasklist-widget.c package: xfce4-panel-4.11.0 plugin: tasklist When you configure your tasklist plugin to "ALWAYS GROUP" the windows and to NOT SHOW button labels, the current implementation of the plugin doesn't permit the user to distinguish between grouped icons and no-grouped ones. Most of other taskbar/dockbar tools give some visual feedback to the user to let him know that there are more instances of the same application open. So, I modded the tasklist plugin to show a little number near the icon of a grouped one when you select to always group the window buttons and to hide the labels. With this mod, the user always knows immediately if an icon represents a "single" window or a "group" of windows. I spent much time to solve little but tedious alignment problems in various configurations of the panel, like the horizontal and deskbar modes, and multi-rows. Maybe it's not perfect, it's not eye-candy, but I think it does its job pretty well. This mod works with every panel size, but it works best with a panel size of 40 pixel in height (if it's horizontal). Note that this patch get rid of a little bug in the current tasklist plugin implementation. Here is the description of the bug: - from a default panel configuration, try to select the following options in the properties: 1) Window grouping: ALWAYS 2) Show button labels: UNCHECK after that the grouped icons (and only them) will be incorrectly rendered in their "mini" version (you can see that more easily if you have a bigger panel size). With this patch, the problem is fixed. :-) Let me know what do you think of this patch and feel free to use it or improve it. Cheers, amigamagic
While i support the general idea and tested this on top of 4.10 branch, this has some glitches: - it makes the icons in all the buttons smaller - and the button for the group is not square anymore.. attaching screenshot for both cases.
Created attachment 5452 default 4.10 tasklist
Created attachment 5453 with the patch, icons grouped
Created attachment 5454 with the patch, icons ungrouped
(In reply to Landry Breuil from comment #1) > While i support the general idea and tested this on top of 4.10 branch, this > has some glitches: > - it makes the icons in all the buttons smaller > - and the button for the group is not square anymore.. > > attaching screenshot for both cases. The icons are smaller because in your scenario you used a panel size smaller than 38 pixel. In this case, my code actually switches the icons to their "mini" versions, because of various (tedious) alignment problems when the "normal-size" icons had to be scaled to smaller versions. So I preferred to not scale them at all, and switch them with their minimized versions when the panel size is set at a value less than 38 pixel. For the second problem you talk about... I don't understand what you mean...
If you look at the screenshot with the grouped icon, the grouped button has less width than other buttons (agreed, since the buttons are set flat you dont see their border but you see the space between others) - not square anymore, ie rectangle.
(In reply to Landry Breuil from comment #6) > If you look at the screenshot with the grouped icon, the grouped button has > less width than other buttons (agreed, since the buttons are set flat you > dont see their border but you see the space between others) - not square > anymore, ie rectangle. That's strange... On my PC they appear to have nearly the same size. It's true that they are not squared because I had to accomodate space for the little number to the bottom right. Maybe the best solution would be to have a "badge" style number that could "overlap" on the icon, so that I should not worry anymore for alignment troubles and we could have squared icons for the grouped ones too (but honestly, I don't care much if the icon buttons are perfectly square or not). Unfortunately, I'm not a GTK expert, so I should need some help for the overlapping thing...
Created attachment 5457 diff file for tasklist-widget.c (v2) Fixes to the previous patch: - Now the icons are properly scaled when the panel size ranges from 16 to 40 pixel. - Fixed some issues reported by Landry Breuil and other little alignment issues with icons and labels. Note: it appears that the current implementation of "wnck_window_get_icon" doesn't get icons larger than 32x32 pixels, so it's not advisable to use panel sizes bigger than ~40 pixel, being that the icons in the tasklist will always keep their 32x32 default size.
I've rebased this patch on top of current master, but I still see at least one issue I would like to fix before merging this: - when a single window is minimized and you then open a second window of that application, the icon remains 70% translucent, so there's at least one unhandled signal/case (active_window_changed or whatever) - the exo stuff should be replaced by style-classes and something like "button image { opacity: 0.7; }"
Whoopsie, disregard my last comment, it was directed at https://bugzilla.xfce.org/show_bug.cgi?id=10862 In any case, I'll be looking into re-basing this patch on top of master as well. Wouldn't mind help of course ;)
This is somewhat enabled now, but it depends on the Gtk+ theme to actually implement this visual distinction: https://git.xfce.org/xfce/xfce4-panel/commit/?id=971188bec9a1336db42492ce32f9a4ad7ecd7f0e I'll probably do that in Greybird soon.
Created attachment 8690 Precondition for patch
Created attachment 8691 Actual patch Here's a patch that achieves the desired result with cairo.
Simon Steinbeiss referenced this bugreport in commit 36bc57e035e0e356e3d59d7442adcdd05884d5c8 tasklist: Draw grouped windows count indicator (Bug #10844) https://git.xfce.org/xfce/xfce4-panel/commit?id=36bc57e035e0e356e3d59d7442adcdd05884d5c8