deps: update to latest zig-wayland

This commit is contained in:
Isaac Freund
2022-05-09 21:56:28 +02:00
parent d5c915e3cb
commit d47be3b592
4 changed files with 30 additions and 5 deletions

View File

@ -87,7 +87,7 @@ fn _main() !void {
var globals = Globals{};
registry.setListener(*Globals, registryListener, &globals);
_ = try display.roundtrip();
if (display.roundtrip() != .SUCCESS) fatal("initial roundtrip failed", .{});
const control = globals.control orelse return error.RiverControlNotAdvertised;
const seat = globals.seat orelse return error.SeatNotAdverstised;
@ -98,7 +98,9 @@ fn _main() !void {
callback.setListener(?*anyopaque, callbackListener, null);
// Loop until our callback is called and we exit.
while (true) _ = try display.dispatch();
while (true) {
if (display.dispatch() != .SUCCESS) fatal("failed to dispatch wayland events", .{});
}
}
fn registryListener(registry: *wl.Registry, event: wl.Registry.Event, globals: *Globals) void {