On Fri, 26 Jan 2018 at 16:05:15 +0100, Enrico Zini wrote: > On Fri, Jan 26, 2018 at 12:04:46PM +0000, Simon McVittie wrote: > > I could well believe that how it works is tied > > to X11 (but I don't understand the mechanics of tray icons well enough > > to be sure of that) > > I confirm that with a X11 session it works.
Having experimented with this a bit more, I *can* get this extension to work with GTK+3 apps in a Wayland GNOME session, but *the app that has a tray icon* has to be running as an X11/XWayland app, not native Wayland (tested with `GDK_BACKEND=x11 sonata` and `GDK_BACKEND=x11 pasystray`). The GNOME session as a whole does not need to be X11; XWayland is enough. If X11 system tray icons are an important part of an app's functionality, it should probably force the X11 backend, the same way apps that rely on other X11-specifics do (like gvim, <https://github.com/vim/vim/commit/f80663f17b2f2499b45eb4467088704c8298c385>). I'll open a bug for pasystray, which segfaults when run in a Wayland session without forcing the X11 backend - the tray icon is literally the only thing it does, so that seems like a good place for the same solution used in gvim. For other implementations of "tray icons" (Qt, libappindicator, Wine, etc.) I imagine there'll be something analogous to GDK_BACKEND and gdk_set_allowed_backends(), but I don't know the specifics of what that is. GtkStatusIcon in GTK+3 has X11, Win32 and Quartz (macOS) implementations, but no Wayland implementation: there's no Wayland protocol for tray icons (that I'm aware of). > I tried enabling the extension, but nothing happens The design of this extension is such that it has no visible effect if there is no app that has successfully exported a tray icon, so the failure mode of "all my apps fail to export their tray icons" is indistinguishable from "the extension didn't appear". smcv