diff options
| author | Jeffrey C. Ollie <jeff@ocjtech.us> | 2025-08-21 12:52:10 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-21 12:52:10 -0500 |
| commit | dcc5aded6e52a91277025a817deb457b4e0b30f7 (patch) | |
| tree | 3feb1c36852f4393bf8156432ab5f27ec1bee708 | |
| parent | d20376c1ff7e9490e34499fa59c54bbdd68f4ebf (diff) | |
| parent | 36f7e018ae9bb4d8a7b080dc2405895e08e731fe (diff) | |
gtk-ng: more complete GTK startup/shutdown in test (#8324)
| -rw-r--r-- | src/apprt/gtk-ng/ext/actions.zig | 5 |
1 files changed, 5 insertions, 0 deletions
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) {} } |
