-
Notifications
You must be signed in to change notification settings - Fork 43
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
Wayland support #90
Comments
Hi, I was told on IRC that the --- a/src/x11-property.c
+++ b/src/x11-property.c
@@ -43,11 +43,15 @@ static Window window;
void x11_property_init()
{
display = gdk_x11_get_default_xdisplay();
+ if (!GDK_IS_X11_DISPLAY(display)) return;
+ Screen* scr = ScreenOfDisplay(display, 0);
+
window = RootWindow(display, 0);
}
void x11_property_set(const char* key, const char* value)
{
+ if (!GDK_IS_X11_DISPLAY(display)) return;
g_debug("[x11-property] setting '%s' to '%s'", key, value);
Atom atom = XInternAtom(display, key, False);
@@ -57,6 +61,7 @@ void x11_property_set(const char* key, c
void x11_property_del(const char* key)
{
+ if (!GDK_IS_X11_DISPLAY(display)) return;
g_debug("[x11-property] deleting '%s'", key);
Atom atom = XInternAtom(display, key, False);
@@ -65,6 +70,7 @@ void x11_property_del(const char* key)
char* x11_property_get(const char* key)
{
+ if (!GDK_IS_X11_DISPLAY(display)) return NULL;
Atom property = XInternAtom(display, key, False);
Atom actual_type;
int actual_format; Unfortunately, this is not enough 😞 . Under wayland the tray icon is not showing, so even if pasystray is not crashing, it is still not very useful yet. |
I'm not sure GtkStatusIcon will ever be supported under wayland, see e.g.: Try configuring pasystray with:
It should fall back to drawing a window instead of a system tray icon. I'm happy to implement a system tray backend for wayland if you can point me to a working implementation. |
Hmm. Appindicator is supposed to work under wayland. But I see the debian package (where I tested this) does not have it enabled (see eg https://buildd.debian.org/status/fetch.php?pkg=pasystray&arch=arm64&ver=0.6.0-1&stamp=1468880631&raw=0) . I will try enabling that first, and will report back. |
AppIndicator does not work either. Interestingly, the HP systray applet based on Qt5 does work. Building as @christophgysin suggested results in a window being opened... but that is not precisely a nice UI 😉 |
BTW, smuxi appears to be able to use the gtk status icon. It uses the gtk 2 bindings to .net. Unfortunately the gtk 2 support is broken in pasystray: the glade file requires gtk3 so I can't check if the problem is in the gtk library. |
If pasystray relies on X11 (which it seems to), then it should probably force use of X11 rather than native Wayland by calling (gvim assumes that it can do X11 things with a GTK top-level window, so native Wayland would require a completely separate graphics backend.) |
Can confirm that adding |
At least for Arch I've created an AUR package called |
@999eagle thanks for your aur package, gonna try it soon. 🙏 |
@999eagle this also solved my issues with Taffybar's SNI Tray. The regular package would not show up. Thanks! |
@christophgysin - I've just installed @999eagle's aur package with the suggested Is there any chance the I can do a PR for this if you want - just checking first if there's a reason you've not already done this. |
@maaarghk I'm happy to merge a PR that adds wayland support without breaking any existing functionality. I haven't tested this in a while, but the above guards were not enough to make pasystray work correctly. |
#156 looks like a plausible solution - even if it's not perfect, it seems like it's going in the right direction. |
I've made #171 which at least fixes the crashes but does not contribute towards feature parity:
|
Hi, I've had a bug reported in Debian against pasystray running under wayland. Basically, pasystray crashes on startup.
From the backtrace, it looks very similar to this bug reported against Empathy in Gnome. Apparently, according to that bug report,
gdk_x11_*
calls aren't expected to work at all under wayland?The text was updated successfully, but these errors were encountered: