Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing tray icons - forward notification area #77

Closed
totaam opened this issue Feb 7, 2012 · 31 comments
Closed

missing tray icons - forward notification area #77

totaam opened this issue Feb 7, 2012 · 31 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Feb 7, 2012

Issue migrated from trac ticket # 77

component: client | priority: minor | resolution: fixed

2012-02-07 04:45:19: ammoled created the issue


XPRA does not display the tray icons of attached applications such as xchat.

@totaam
Copy link
Collaborator Author

totaam commented Feb 7, 2012

2012-02-07 12:26:37: totaam changed status from new to accepted

@totaam
Copy link
Collaborator Author

totaam commented Feb 7, 2012

2012-02-07 12:26:37: totaam changed owner from antoine to totaam

@totaam
Copy link
Collaborator Author

totaam commented Feb 7, 2012

2012-02-07 12:26:37: totaam

@totaam
Copy link
Collaborator Author

totaam commented Feb 7, 2012

2012-02-07 12:26:37: totaam commented


and it may never do

@totaam
Copy link
Collaborator Author

totaam commented Feb 7, 2012

2012-02-07 12:37:29: totaam commented


This is a very difficult problem to solve - I am not even sure it can be solved:

  • there are at least two main implementations of "tray icons" on *nix: gtk's "StatusIcon" and Ubuntu's "appindicator" (see tray icon and menu icons are blank #43 for an example of how much of a mess it is to try to support them all)
  • none of these support overriding at present (and afaik none use dbus..), so the code would have duplicated in each case
    Pointers welcome.

@totaam
Copy link
Collaborator Author

totaam commented Feb 10, 2012

2012-02-10 08:29:53: totaam commented


Looks like I was wrong about them not using dbus, so we may be able to do something after all (as was done for #22), some more pointers:

@totaam
Copy link
Collaborator Author

totaam commented May 16, 2012

2012-05-16 14:59:18: antoine commented


Or even by implementing the raw X11 specification: docking a tray icon - although this is probably more difficult (we would need a fake area to dock into then we need to implement XEmbed).

@totaam
Copy link
Collaborator Author

totaam commented May 16, 2012

2012-05-16 14:59:18: antoine

1 similar comment
@totaam
Copy link
Collaborator Author

totaam commented May 16, 2012

2012-05-16 14:59:18: antoine

@totaam
Copy link
Collaborator Author

totaam commented Jul 13, 2012

2012-07-13 13:47:29: antoine changed type from defect to enhancement

@totaam
Copy link
Collaborator Author

totaam commented Jul 13, 2012

2012-07-13 13:47:29: antoine changed title from Missing Tray Icons to missing tray icons - forward notification area

@totaam
Copy link
Collaborator Author

totaam commented Nov 8, 2012

2012-11-08 06:45:00: antoine commented


comment:3 is wrong about being wrong about dbus (..): the spec does not use dbus, and most apps will not use a dbus interface either, so we must implement the docking tray icon spec directly.

Found pypanel which may serve as a good base for implementing our own tray icon forwarding code.

@totaam
Copy link
Collaborator Author

totaam commented Nov 8, 2012

2012-11-08 15:20:19: antoine uploaded file tray-area.patch (5.5 KiB)

adds a hardcoded area for tray icons to dock into - ugly hack for now

@totaam
Copy link
Collaborator Author

totaam commented Nov 8, 2012

2012-11-08 17:41:49: antoine uploaded file tray-area-v2.patch (12.8 KiB)

much more complete implementation

@totaam
Copy link
Collaborator Author

totaam commented Nov 9, 2012

2012-11-09 17:16:50: antoine uploaded file tray-area-v3.patch (25.0 KiB)

we can almost click on the forwarded icon too

@totaam
Copy link
Collaborator Author

totaam commented Nov 10, 2012

2012-11-10 13:01:13: antoine uploaded file tray-area-v4.patch (34.4 KiB)

updated patch for r2088

@totaam
Copy link
Collaborator Author

totaam commented Nov 11, 2012

2012-11-11 10:49:03: antoine uploaded file tray-area-v5.patch (49.1 KiB)

updated patch with cleanups

@totaam
Copy link
Collaborator Author

totaam commented Nov 11, 2012

2012-11-11 12:53:16: antoine uploaded file tray-area-v6.patch (50.4 KiB)

work on transparency

@totaam
Copy link
Collaborator Author

totaam commented Nov 11, 2012

2012-11-11 18:17:12: antoine commented


  • r2094 adds the server-side part
  • r2097 adds the client-side part

It is mostly working as it is, but with some limitations we should address:

  • missing transparency: we set _NET_SYSTEM_TRAY_VISUAL to the 32-bit visual - but somehow the docking requests we receive are for 24-bit visual windows, not sure why.
  • gtk.StatusIcon only gives us two events for mouse clicks: activate and popup-menu so we end up simulating a button press and release on the remote tray area. By implementing the system tray using raw X11 calls we ought to be able to get more useful events to forward, the win32 implementation can probably supply the same too in OnTaskbarNotify. We can then use the StatusIcon version as fallback for platforms without native support (ie: osx or pure-python builds).
  • we should avoid the round-trip via a pixmap backing to get the pixbuf
  • detect when we lose the tray selection and cleanup
  • support balloon messages

@totaam
Copy link
Collaborator Author

totaam commented Nov 11, 2012

2012-11-11 18:17:12: antoine

@totaam
Copy link
Collaborator Author

totaam commented Nov 11, 2012

2012-11-11 18:24:08: antoine uploaded file window-backing-depth.patch (2.7 KiB)

adds the ability to handle 32-bit window backing

@totaam
Copy link
Collaborator Author

totaam commented Feb 24, 2013

2013-02-24 15:30:10: antoine commented


We probably also need to split this code into a separate executable so that we can exit/upgrade xpra without losing the trays.

@totaam
Copy link
Collaborator Author

totaam commented Mar 5, 2013

2013-03-05 10:01:03: antoine commented


For transparency, see #279

@totaam
Copy link
Collaborator Author

totaam commented May 21, 2013

2013-05-21 10:11:05: antoine commented


transparency fixed in r3475 for *nix

@totaam
Copy link
Collaborator Author

totaam commented Jul 16, 2013

2013-07-16 07:03:38: antoine changed status from accepted to new

@totaam
Copy link
Collaborator Author

totaam commented Jul 16, 2013

2013-07-16 07:03:38: antoine commented


Works well enough.

@totaam
Copy link
Collaborator Author

totaam commented Jul 16, 2013

2013-07-16 07:03:49: antoine changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Jul 16, 2013

2013-07-16 07:03:49: antoine changed resolution from ** to fixed

@totaam totaam closed this as completed Jul 16, 2013
@totaam
Copy link
Collaborator Author

totaam commented Oct 31, 2013

2013-10-31 12:28:12: totaam commented


win32 native code in use as of r4640 - which allows us to do things other implementations cannot do: hovering events, etc

@totaam
Copy link
Collaborator Author

totaam commented May 19, 2014

2014-05-19 13:37:05: totaam

@totaam
Copy link
Collaborator Author

totaam commented May 19, 2014

2014-05-19 13:37:05: totaam commented


(setting correct milestone the work was completed in)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant