diff options
| author | Isaac Freund <mail@isaacfreund.com> | 2022-05-09 21:56:28 +0200 |
|---|---|---|
| committer | Isaac Freund <mail@isaacfreund.com> | 2022-05-11 18:02:32 +0200 |
| commit | d47be3b5920cc0a9bed06a885bbf5785a06e8161 (patch) | |
| tree | 1a0d3a546410f54b6c858e0f46a716719b24167e /riverctl/main.zig | |
| parent | d5c915e3cb9967b33b6fb6a9786d13c959dc629a (diff) | |
| download | river-d47be3b5920cc0a9bed06a885bbf5785a06e8161.tar.gz river-d47be3b5920cc0a9bed06a885bbf5785a06e8161.tar.xz | |
deps: update to latest zig-wayland
Diffstat (limited to 'riverctl/main.zig')
| -rw-r--r-- | riverctl/main.zig | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/riverctl/main.zig b/riverctl/main.zig index 832d2db..853b94e 100644 --- a/riverctl/main.zig +++ b/riverctl/main.zig @@ -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 { |
