Closed elijahimmer closed 8 months ago
I don't think this is an issue with the Rust wrapper, but with the underlying C library. There is an issue that looks related: https://github.com/wmww/gtk4-layer-shell
I didn't check the closed issues, I see it now, I thought it was upstream but I didn't see the issue and didn't wanna go to upstream prematurely. Thanks for the quick response.
No worries :-)
Description
having tool tips, via
WidgetExt::set_tooltip_text()
, setting the text in a widget builder, or connecting to the query tool tip widget causes a segfault when the tooltip is shown.I made a basic example at https://github.com/elijahimmer/layer-shell-tt-test
This includes both GTK3 (which works) and GTK4 test. This only happens when
init_layer_shell()
is on the window, and applies to any widgets in the window as far as I have tested.Tested on the compositor: Hyprland Operating system: Nixos Lib
Reproducible Code
All you have to do is hover over the text to cause a tooltip to appear. In the repo https://github.com/elijahimmer/layer-shell-tt-test I also ported it to GTK3 and it works fine.
This looks like it could be a similar issue to #21 because they are both signal based, (well, I guess signals are basically everything in GTK)
EDIT 1: I added a few more tests to the repo, and the issue only occurs if the tooltip is actually show, I used
WidgetExt::connect_query_tooltip()
and when the inner function returns false (don't show) it doesn't crash. I don't know enough about how GTK or the layer shell works to do more than speculate about what is happening.I think this could be a upstream issue, but I haven't tested it in C so I didn't wanna go upstream per-maturely. Also: Awesome library bindings, thanks for all you work.