remove(core/linux/X11): errorHandler in favor of the more verbose default handler

This commit is contained in:
Ronald M Zielaznicki 2024-10-21 12:55:16 -04:00 committed by Stephen Gutekanst
parent 90b0923fa5
commit 59b453c024

View file

@ -185,7 +185,6 @@ pub fn init(
.surface_descriptor = surface_descriptor, .surface_descriptor = surface_descriptor,
.libxkbcommon = try LibXkbCommon.load(), .libxkbcommon = try LibXkbCommon.load(),
}; };
_ = libx11.XSetErrorHandler(errorHandler);
_ = libx11.XrmInitialize(); _ = libx11.XrmInitialize();
defer _ = libx11.XFreeColormap(display, colormap); defer _ = libx11.XFreeColormap(display, colormap);
for (0..2) |i| { for (0..2) |i| {
@ -442,12 +441,6 @@ const LibXkbCommon = struct {
} }
}; };
fn errorHandler(display: ?*c.Display, event: [*c]c.XErrorEvent) callconv(.C) c_int {
_ = display;
log.err("X11: error code {d}\n", .{event.*.error_code});
return 0;
}
fn createStandardCursor(x11: *X11, shape: CursorShape) !c.Cursor { fn createStandardCursor(x11: *X11, shape: CursorShape) !c.Cursor {
if (x11.libxcursor) |libxcursor| { if (x11.libxcursor) |libxcursor| {
const theme = libxcursor.XcursorGetTheme(x11.display); const theme = libxcursor.XcursorGetTheme(x11.display);