core: silently fail to connect to linux display and improve logging

This commit is contained in:
Joshua Holmes 2024-10-18 15:29:18 -07:00 committed by Stephen Gutekanst
parent 2f095fdc21
commit 0a5d817f54
3 changed files with 23 additions and 21 deletions

View file

@ -99,8 +99,7 @@ pub fn init(
else => return err,
};
const display = libx11.XOpenDisplay(null) orelse {
std.log.err("X11: Cannot open display", .{});
return error.CannotOpenDisplay;
return error.FailedToConnectToDisplay;
};
const screen = c.DefaultScreen(display);
const visual = c.DefaultVisual(display, screen);