From 2142ba53c435e284a79f205a852c6e916c6cf4c8 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 4 Sep 2024 14:17:01 -0700 Subject: [PATCH] apprt/gtk: do not remove unfocused widget from overlay See comment --- src/apprt/gtk/Surface.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apprt/gtk/Surface.zig b/src/apprt/gtk/Surface.zig index 2d72c3e5d..37a72fd86 100644 --- a/src/apprt/gtk/Surface.zig +++ b/src/apprt/gtk/Surface.zig @@ -597,12 +597,12 @@ pub fn deinit(self: *Surface) void { if (self.cgroup_path) |path| self.app.core_app.alloc.free(path); // Free all our GTK stuff + // + // Note we don't do anything with the "unfocused_overlay" because + // it is attached to the overlay which by this point has been destroyed + // and therefore the unfocused_overlay has been destroyed as well. c.g_object_unref(self.im_context); if (self.cursor) |cursor| c.g_object_unref(cursor); - if (self.unfocused_widget) |widget| { - c.gtk_overlay_remove_overlay(self.overlay, widget); - self.unfocused_widget = null; - } self.resize_overlay.deinit(); }