Open SilverRainZ opened 3 years ago
pnmixer wasn't written with wayland in mind. I can't use wayland, because of my graphics card, so I'm unable to test anything.
If you want to dig into the code, check
I'm suspecting disp = gdk_x11_get_default_xdisplay();
maybe fails and we get a null pointer.
i'm also getting this in pnmixer under sway in Debian bookworm:
anarcat@angela:~$ pnmixer
(pnmixer:681401): dbind-WARNING **: 23:46:21.393: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.systemd1.UnitMasked: Unit at-spi-dbus-bus.service is masked.
(pnmixer:681401): GVFS-WARNING **: 23:46:21.395: Error creating proxy: Error calling StartServiceByName for org.gtk.vfs.Daemon: Unit gvfs-daemon.service is masked. (g-io-error-quark, 36)
(pnmixer:681401): Gtk-CRITICAL **: 23:46:21.426: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
(pnmixer:681401): GLib-GObject-WARNING **: 23:46:21.426: invalid cast from 'GdkWaylandScreen' to 'GdkX11Screen'
(pnmixer:681401): GLib-GObject-WARNING **: 23:46:21.426: invalid cast from 'GdkWaylandDisplay' to 'GdkX11Display'
(pnmixer:681401): GLib-GObject-WARNING **: 23:46:21.426: invalid cast from 'GdkWaylandDisplay' to 'GdkX11Display'
Segmentation fault (core dumped)
but yeah, looks like there's a bit too much x11-specific code in there... maybe there's a more backend-neutral way of doing this? from what i understand, it should be possible to write some GTK app that transparently works on x11 or wayland...
and for what it's worth it does start in Xwayland mode with:
GDK_BACKEND=x11 pnmixer
... but unfortunately, in sway (with waybar as a tray-holder), i don't actually see the tray pop up...
maybe there's a more backend-neutral way of doing this?
That'll likely be a rewrite.
Env:
Backtrace: