build: work around zig 0.10.0 bug to fix CI

This commit is contained in:
Isaac Freund 2023-03-15 11:02:03 +01:00
parent c2ce893dd0
commit 50c6ae245f
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11

View File

@ -297,7 +297,11 @@ pub fn updateCurrent(view: *Self) void {
} }
xdg_toplevel.configure_state = .idle; xdg_toplevel.configure_state = .idle;
}, },
.xwayland_view => |xwayland_view| { // TODO(zig): this capture does not need to be mutable and the if (build_options.xwayland)
// is unnecessary. However, zig 0.10.0 is buggy and these work around a bug. They are both
// fixed in zig 0.10.1 and newer but we currently rely on 0.10.0 for FreeBSD CI.
.xwayland_view => |*xwayland_view| {
if (build_options.xwayland) {
if (view.inflight.resizing) { if (view.inflight.resizing) {
view.resizeUpdatePosition( view.resizeUpdatePosition(
xwayland_view.xwayland_surface.width, xwayland_view.xwayland_surface.width,
@ -308,6 +312,7 @@ pub fn updateCurrent(view: *Self) void {
view.inflight.box.height = xwayland_view.xwayland_surface.height; view.inflight.box.height = xwayland_view.xwayland_surface.height;
view.pending.box.width = xwayland_view.xwayland_surface.width; view.pending.box.width = xwayland_view.xwayland_surface.width;
view.pending.box.height = xwayland_view.xwayland_surface.height; view.pending.box.height = xwayland_view.xwayland_surface.height;
}
}, },
.none => {}, .none => {},
} }