Refactor Bar/Output surfaces into anon struct

Both the wl_surface and layer_surface in each are always expected to
exist at the same time. Since they're optional, it makes more sense to
combine them into a single optional struct.
This commit is contained in:
Ben Buhse 2026-02-15 18:02:48 -06:00
commit 43ebdd273c
No known key found for this signature in database
GPG key ID: 7916ACFCD38FD0B4
3 changed files with 52 additions and 43 deletions

View file

@ -143,7 +143,7 @@ pub fn manage(context: *Context) void {
while (out_it.next()) |output| {
if (context.wallpaper_image == null) {
output.deinitWallpaperLayerSurface();
} else if (output.wl_surface != null) {
} else if (output.surfaces != null) {
output.renderWallpaper() catch |err| {
log.err("Wallpaper re-render failed: {}", .{err});
};