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:
parent
e186a2d017
commit
00835cea08
4 changed files with 28 additions and 6 deletions
|
|
@ -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)});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue