Fix crash when wallpaper_image_path is missing

This makes the WM run fine even if wallpaper_image fails to load for any
other reason. Right now, it's still just a black background. At some
point, I plan to add the ability to also just set a color as a
background but that's a fairly low priority.
This commit is contained in:
Ben Buhse 2026-02-07 17:56:05 -06:00
commit 00835cea08
No known key found for this signature in database
GPG key ID: 7916ACFCD38FD0B4
4 changed files with 28 additions and 6 deletions

View file

@ -105,6 +105,10 @@ fn registryListener(registry: *wl.Registry, event: wl.Registry.Event, globals: *
globals.wl_shm = registry.bind(ev.name, wl.Shm, 1) catch |e| {
fatal("Failed to bind to wl_shm: {any}", .{@errorName(e)});
};
} else if (mem.orderZ(u8, ev.interface, river.LayerShellV1.interface.name) == .eq) {
globals.river_layer_shell_v1 = registry.bind(ev.name, river.LayerShellV1, 1) catch |e| {
fatal("Failed to bind to river_layer_shell_v1: {any}", .{@errorName(e)});
};
} else if (mem.orderZ(u8, ev.interface, river.WindowManagerV1.interface.name) == .eq) {
globals.river_window_manager_v1 = registry.bind(ev.name, river.WindowManagerV1, 3) catch |e| {
fatal("Failed to bind to river_window_manager_v1: {any}", .{@errorName(e)});