From 36f7e018ae9bb4d8a7b080dc2405895e08e731fe Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Thu, 21 Aug 2025 09:29:17 -0500 Subject: [PATCH] gtk-ng: more complete GTK startup/shutdown --- src/apprt/gtk-ng/ext/actions.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/apprt/gtk-ng/ext/actions.zig b/src/apprt/gtk-ng/ext/actions.zig index 7d13af961..8499e7de8 100644 --- a/src/apprt/gtk-ng/ext/actions.zig +++ b/src/apprt/gtk-ng/ext/actions.zig @@ -105,6 +105,9 @@ test "adding actions to an object" { // This test requires a connection to an active display environment. if (gtk.initCheck() == 0) return error.SkipZigTest; + _ = glib.MainContext.acquire(null); + defer glib.MainContext.release(null); + const callbacks = struct { fn callback(_: *gio.SimpleAction, variant_: ?*glib.Variant, self: *gtk.Box) callconv(.c) void { const i32_variant_type = glib.ext.VariantType.newFor(i32); @@ -155,4 +158,6 @@ test "adding actions to an object" { const actual = value.getInt(); try testing.expectEqual(expected, actual); + + while (glib.MainContext.iteration(null, 0) != 0) {} }