Hello I found the following issue.
Bug description
I made this function based on Adwaita Demo debug info code
fn get_gtk_info() -> (String, String) {
let mut backend = String::new();
let mut renderer = String::new();
if let Some(display) = gdk::Display::default() {
let backend_ = match display.type_().name() {
"GdkX11Display" => "X11",
"GdkWaylandDisplay" => "Wayland",
"GdkBroadwayDisplay" => "Broadway",
"GdkMacosDisplay" => "macOS",
back => back,
};
backend.push_str(backend_);
let surface = gdk::Surface::new_toplevel(&display);
if let Some(gsk_renderer) = gtk::gsk::Renderer::for_surface(&surface) {
let rend = match gsk_renderer.type_().name() {
"GskVulkanRenderer" => "Vulkan",
"GskNglRenderer" => "NGL",
"GskGLRenderer" => "GL",
"GskCairoRenderer" => "Cairo",
rend => rend,
};
renderer.push_str(rend);
gsk_renderer.unrealize(); // Raise --> GLib-GObject-CRITICAL **: 01:27:13.178: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
}
surface.destroy();
}
(backend, renderer)
}
The issue is that it raises the non fatal trace
GLib-GObject-CRITICAL **: 01:27:13.178: g_object_unref: assertion 'G_IS_OBJECT
My guess is that it should call g_object_unref (gsk_renderer);, but I'm failing to.
Is it possible that gtk::gsk::Renderer shall implement the Drop trait that will call g_object_unref?
Thanks for this wonderful framework.
Hello I found the following issue.
Bug description
I made this function based on Adwaita Demo debug info code
The issue is that it raises the non fatal trace
My guess is that it should call
g_object_unref (gsk_renderer);, but I'm failing to.Is it possible that
gtk::gsk::Renderershall implement theDroptrait that will callg_object_unref?Thanks for this wonderful framework.