Legacy system tray icons back in Plasma 5

Didn't we drop support?

Legacy system tray icons are problematic; they don't scale, they don't fit in with the theme, they can't multiplex (be in two trays) and they're just generally very dated.

We came up with a new scheme Status Notifier Items (SNIs) back in 2009, which was also adopted by our friends at Ubuntu in Unity, which provides logical information over DBus about what to show, rather than just an arbitrary window.

Our existing xembed code needed an entire rewrite, given wayland would also break xembed it seemed a more useful investment of time to make sure most the toolkits supported the SNI specification than work on the rewrite.

In retrospect, I think we underestimated the fallout this would cause. There are propreitory apps, more random toolkits that weren't covered, and some distros didn't apply all the patches needed

There's nothing wrong with changing our minds in response to user feedback.

Restored Support

Having decided that we can't drop support just yet, it seems unlikely we can drop it in a few months when we switch to Wayland. So we need to consider how to make that work there. Embedding an X window inside a wayland window isn't going to work.

My solution was a hidden process, xembedsniproxy, renders the embedded windows offscreen then uses the existing SNI specification to inform Plasma. Plasma gets support, including multiplexing without really knowing about X.

It should be as seemless as anything else.

Current State

It's at a state where it's usable, but there are undoubtedly still some bugs. Every toolkit has their own quirks regarding system trays.

Please leave a comment if you find anything.

The code is currently in a test repository here

It is available already in yaourt for Arch users:
aur/xembed-sni-proxy-git

I hope to have it merged into Plasma for 5.5, depending on feedback.