gtk4-layer-shell: Setting tooltip on a widget then hovering over it segfaults.

Hey, thank you for this library. I have an issue just as the title says. It happens on Hyprland. Tested it on Sway and there it works with a warning message “Gdk warning: Compositor doesn’t support moving popups, relying on remapping”.

  • Fedora 38
  • Hyprland v0.27.2
  • gtk4 4.10.4-1
  • gtk4-layer-shell 1.0.1
  • gjs 1.76.2

here is an example

imports.gi.versions.Gtk = '4.0';
const { Gtk, Gtk4LayerShell } = imports.gi;

const app = new Gtk.Application();
app.connect('activate', () => {
    const label = new Gtk.Label({
        label: 'hello',
        tooltipText: 'crash',
    });

    const win = new Gtk.Window({
        application: app,
        defaultWidth: 100,
        defaultHeight: 100,
        child: label,
    });

    Gtk4LayerShell.init_for_window(win);
    win.present();
});
app.run(null);

what other information can I provide that would be useful? Should I also open an issue on Hyprland?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 4
  • Comments: 21 (8 by maintainers)

Most upvoted comments

I have finally managed to reproduce. It appears that the copy of xdg-shell.xml I keep in the repo is out of date, and when proxying requests this causes problems. Will mark wayland-protocols as a required build dependency and remove xdg-shell.xml from this repo. Thanks everyone for getting to the bottom of it.

EDIT: in the next release the library will not build without system wayland-protocols, but having wayland-protocols installed on the system buidling gtk4-layer-shell should fix this issue for any version.

Thanks for bringing this up! I’ve added it to the makedeps and the new 1.0.3-2 version should hopefully have that fixed. I must have overlooked something when I was testing 😦

The Arch package needs depends on wayland-protocols (or perhaps just builddepends, it’s not easy for me to test what happens if wayland-protocols is missing at runtime).

Since the package has moved from AUR into the official Extra repository, this will need to be reported against the official gtk4-layer-shell package. Unforunately since the move of the Arch package issue tracker to Gitlab, manual approval for signups to the tracker is required and I’m waiting for approval so I can’t lodge an issue currently.

@wmww perhaps it would be a good idea to mark wayland-protocols as a hard dependency in the build to avoid the possibility that this occurs again in future?

You could run it and make it crash with WAYLAND_DEBUG=1 and upload the log. Maybe that would help me identify some difference between our setups at runtime. No rush, it will probably take me some time to get to this. If anyone else is encountering the same problem, please speak up or 😕 react, I’ll try to prioritize this higher if it’s effecting multiple people and nobody else can figure it out.