Split from #1701.
To make it easier to distinguish xpra sessions from each other, we could enumerate all the windows we have forwarded and combine their window icons into one.
If we don't have enough space to do this (ie: win32 systray can be quite small), maybe just show the first one on top of a stack.
The end result should not lose a clear indication that icon is for an instance of xpra, ie. so that the user doesn't confuse the icon for an application running in its native X environment.
Mostly done in r17673 (add overlay), r17674 (fixup reset icon code), r17691: use icon for tray.
XPRA_ICON_OVERLAY env var controls what percentage of the icon we overlay with xpra's default icon (defaults to 50%).
Whenever the list of windows changes, we figure out if all the icons are the same, and if they are then we use that one as tray icon instead of xpra's default icon.
@Boruch: does that work for you?
Using version r17795, The icons do work, and the
XPRA_ICON_OVERLAY environment variable seems to be respected; however, the result for me isn't very visually noticeable. In the attached screenshot (a crop and zoom of the screenshot I posted for issue #1702), the first two icons were created with the default
XPRA_ICON_OVERLAY setting, the third is an icon for an
xpra instance running
xclock, which may not have an icon of its own, and the fourth is an icon created with
XPRA_ICON_OVERLAY set to 75. For me, the
xpra contribution to the icon seems swallowed up by the other program's image.
Maybe, if its possible, define for
xpra some percentage of the lower left of the icon space, and define for the program being run some percentage of the upper right of the icon space. With a setting of 65% for
xpra and a setting of 50% for the other program, there would be an acceptable overlap, and my guess is that both images would remain clear. (IANAGD - I am not a graphic designer).
Done in r17836, but still top-left to bottom-right, with defaults values (adjustable):
XPRA_ICON_SHRINKAGE=75- shrink the application icon to 75% of its original size
XPRA_ICON_OVERLAY=50- shrink xpra icon to 50%
The result looks good to me, with only a slight overlap now, but this will need to be tested on more platforms, in particular win32 can have some very small tray icons which may cause problems with legibility. (and Ubuntu's Unity, macos... the usual problematic platforms)
Minor improvements in r18189 + r18191: we don't overlay the xpra icon onto itself if we end up having to use the default icon for a window (ie: glxspheres).
@maxmylyn: FYI, feel free to just close.
Noted and closing. Sorry for the long turnaround - been busy and reassigned to other things
Fix in r19719: we reset the icon after one second to workaround tray geometry bugs (ie: gnome shell with topicons), but this was overwriting the dynamic icon with the default one.
Note: this feature can be disabled completely by setting:
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1707