core: silently fail to connect to linux display and improve logging
This commit is contained in:
parent
2f095fdc21
commit
0a5d817f54
3 changed files with 23 additions and 21 deletions
|
|
@ -83,7 +83,7 @@ pub fn init(
|
|||
.libxkbcommon = try LibXkbCommon.load(),
|
||||
.libwaylandclient = libwaylandclient_global,
|
||||
.interfaces = Interfaces{},
|
||||
.display = libwaylandclient_global.wl_display_connect(null) orelse return error.FailedToConnectToWaylandDisplay,
|
||||
.display = libwaylandclient_global.wl_display_connect(null) orelse return error.FailedToConnectToDisplay,
|
||||
.title = try options.allocator.dupeZ(u8, options.title),
|
||||
.size = &linux.size,
|
||||
.modifiers = .{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue