deps: update to Zig 0.10
This commit is contained in:
@ -218,7 +218,7 @@ pub fn setTheme(self: *Self, theme: ?[*:0]const u8, _size: ?u32) !void {
|
||||
while (it) |node| : (it = node.next) {
|
||||
const wlr_output = node.data.wlr_output;
|
||||
self.xcursor_manager.load(wlr_output.scale) catch
|
||||
log.err("failed to load xcursor theme '{s}' at scale {}", .{ theme, wlr_output.scale });
|
||||
log.err("failed to load xcursor theme '{?s}' at scale {}", .{ theme, wlr_output.scale });
|
||||
}
|
||||
|
||||
// If this cursor belongs to the default seat, set the xcursor environment
|
||||
@ -227,12 +227,12 @@ pub fn setTheme(self: *Self, theme: ?[*:0]const u8, _size: ?u32) !void {
|
||||
if (self.seat == server.input_manager.defaultSeat()) {
|
||||
const size_str = try std.fmt.allocPrintZ(util.gpa, "{}", .{size});
|
||||
defer util.gpa.free(size_str);
|
||||
if (c.setenv("XCURSOR_SIZE", size_str, 1) < 0) return error.OutOfMemory;
|
||||
if (c.setenv("XCURSOR_SIZE", size_str.ptr, 1) < 0) return error.OutOfMemory;
|
||||
if (theme) |t| if (c.setenv("XCURSOR_THEME", t, 1) < 0) return error.OutOfMemory;
|
||||
|
||||
if (build_options.xwayland) {
|
||||
self.xcursor_manager.load(1) catch {
|
||||
log.err("failed to load xcursor theme '{s}' at scale 1", .{theme});
|
||||
log.err("failed to load xcursor theme '{?s}' at scale 1", .{theme});
|
||||
return;
|
||||
};
|
||||
const wlr_xcursor = self.xcursor_manager.getXcursor("left_ptr", 1).?;
|
||||
@ -649,7 +649,7 @@ pub fn unhide(self: *Self) void {
|
||||
self.updateState();
|
||||
}
|
||||
|
||||
fn handleHideCursorTimeout(self: *Self) callconv(.C) c_int {
|
||||
fn handleHideCursorTimeout(self: *Self) c_int {
|
||||
log.debug("hide cursor timeout", .{});
|
||||
self.hide();
|
||||
return 0;
|
||||
@ -1159,16 +1159,11 @@ fn warp(self: *Self) void {
|
||||
.width = view.current.box.width,
|
||||
.height = view.current.box.height,
|
||||
},
|
||||
.xwayland_override_redirect => |or_window| blk: {
|
||||
assert(build_options.xwayland);
|
||||
// TODO(zig): remove this line when updating to the self hosted compiler.
|
||||
if (!build_options.xwayland) return;
|
||||
break :blk wlr.Box{
|
||||
.x = or_window.xwayland_surface.x,
|
||||
.y = or_window.xwayland_surface.y,
|
||||
.width = or_window.xwayland_surface.width,
|
||||
.height = or_window.xwayland_surface.height,
|
||||
};
|
||||
.xwayland_override_redirect => |or_window| wlr.Box{
|
||||
.x = or_window.xwayland_surface.x,
|
||||
.y = or_window.xwayland_surface.y,
|
||||
.width = or_window.xwayland_surface.width,
|
||||
.height = or_window.xwayland_surface.height,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user