diff options
Diffstat (limited to 'riverctl')
| -rw-r--r-- | riverctl/main.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/riverctl/main.zig b/riverctl/main.zig index 80f6fb4..b0511b4 100644 --- a/riverctl/main.zig +++ b/riverctl/main.zig @@ -110,10 +110,10 @@ fn _main() !void { fn registryListener(registry: *wl.Registry, event: wl.Registry.Event, globals: *Globals) void { switch (event) { .global => |global| { - if (std.cstr.cmp(global.interface, wl.Seat.getInterface().name) == 0) { + if (mem.orderZ(u8, global.interface, wl.Seat.getInterface().name) == .eq) { assert(globals.seat == null); // TODO: support multiple seats globals.seat = registry.bind(global.name, wl.Seat, 1) catch @panic("out of memory"); - } else if (std.cstr.cmp(global.interface, zriver.ControlV1.getInterface().name) == 0) { + } else if (mem.orderZ(u8, global.interface, zriver.ControlV1.getInterface().name) == .eq) { globals.control = registry.bind(global.name, zriver.ControlV1, 1) catch @panic("out of memory"); } }, @@ -132,7 +132,7 @@ fn callbackListener(_: *zriver.CommandCallbackV1, event: zriver.CommandCallbackV }, .failure => |failure| { // A small hack to provide usage text when river reports an unknown command. - if (std.cstr.cmp(failure.failure_message, "unknown command") == 0) { + if (mem.orderZ(u8, failure.failure_message, "unknown command") == .eq) { std.log.err("unknown command", .{}); io.getStdErr().writeAll(usage) catch {}; os.exit(1); |
