remove timeout source when window is disposed

pull/12843/head
Daniel Kinzler 2026-05-28 15:08:12 +02:00
parent 37997f8dbe
commit 1753d57bfd
1 changed files with 7 additions and 0 deletions

View File

@ -1237,6 +1237,13 @@ pub const Window = extern struct {
fn dispose(self: *Self) callconv(.c) void {
const priv = self.private();
if (priv.timeout) |v| {
if (glib.Source.remove(v) == 0) {
log.warn("unable to remove timeout source", .{});
}
priv.timeout = null;
}
priv.command_palette.set(null);
if (priv.config) |v| {