xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 4 years ago

Closed 4 years ago

Last modified 16 months ago

#1707 closed enhancement (fixed)

use the application icons for the systray icon

Reported by: Antoine Martin Owned by: J. Max Mena
Priority: minor Milestone: 2.3
Component: client Version: trunk
Keywords: Cc:


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.

Attachments (1)

xpra_icons_3.png (8.2 KB) - added by Boruch 4 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 4 years ago by Boruch

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.

comment:2 Changed 4 years ago by Antoine Martin

Status: newassigned

Mostly done in r17673 (add overlay), r17674 (fixup reset icon code), r17691: use icon for tray.

The 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.


  • not tested on Ubuntu Unity, KDE or macos
  • tray icon is disabled on win32 (looks garbled, loses the "visibility" settings - not sure the latter is fixable)

comment:3 Changed 4 years ago by Antoine Martin

Owner: changed from Antoine Martin to Boruch
Status: assignednew

Minor changes:

  • r17763: impossible to enable on macos (the dock icon cannot be changed once set)
  • r17765: fix MS Windows systray code and enable it there


  • pagers and window decoration icons should now be using a composite icon with the xpra logo overlaid in the bottom right corner
  • the systray icon will use the same composite icon as long as there is only one window, or if all the windows use the same icon - otherwise the default "xpra" icon will be used

@Boruch: does that work for you?

Changed 4 years ago by Boruch

Attachment: xpra_icons_3.png added

comment:4 Changed 4 years ago by Boruch

Owner: changed from Boruch to Antoine

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).

Last edited 4 years ago by Antoine Martin (previous) (diff)

comment:5 Changed 4 years ago by Antoine Martin

Owner: changed from Antoine to Boruch

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)

comment:6 Changed 4 years ago by Antoine Martin

Owner: changed from Boruch to J. Max Mena

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.

comment:7 Changed 4 years ago by J. Max Mena

Resolution: fixed
Status: newclosed

Noted and closing. Sorry for the long turnaround - been busy and reassigned to other things

comment:8 Changed 4 years ago by Antoine Martin

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: XPRA_DYNAMIC_TRAY_ICON=0.

Last edited 4 years ago by Antoine Martin (previous) (diff)

comment:9 Changed 16 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1707

Note: See TracTickets for help on using tickets.