xpra icon
Bug tracker and wiki

Opened 8 weeks ago

Last modified 2 weeks ago

#1707 new enhancement

use the application icons for the systray icon

Reported by: Antoine Martin Owned by: Boruch
Priority: minor Milestone: 2.3
Component: client Version: trunk
Keywords: Cc:

Description

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 2 weeks ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 8 weeks 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 5 weeks 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.

Caveats:

  • 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 3 weeks 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

Recap:

  • 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 2 weeks ago by Boruch

Attachment: xpra_icons_3.png added

comment:4 Changed 2 weeks 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 2 weeks ago by Antoine Martin (previous) (diff)

comment:5 Changed 2 weeks 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)

Note: See TracTickets for help on using tickets.