diff options
| author | Isaac Freund <mail@isaacfreund.com> | 2023-03-15 11:02:03 +0100 |
|---|---|---|
| committer | Isaac Freund <mail@isaacfreund.com> | 2023-03-15 17:34:10 +0100 |
| commit | 50c6ae245feedbc0e8e7d1abc955f79e290d3cd9 (patch) | |
| tree | dfcc05d95543bff3fd4099c2e44fc6bd7ee1db5a | |
| parent | c2ce893dd0b05a11b7907c6a6af92eb5d74e288e (diff) | |
| download | river-50c6ae245feedbc0e8e7d1abc955f79e290d3cd9.tar.gz river-50c6ae245feedbc0e8e7d1abc955f79e290d3cd9.tar.xz | |
build: work around zig 0.10.0 bug to fix CI
| -rw-r--r-- | river/View.zig | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/river/View.zig b/river/View.zig index 9a860b7..249cf0e 100644 --- a/river/View.zig +++ b/river/View.zig @@ -297,17 +297,22 @@ pub fn updateCurrent(view: *Self) void { } xdg_toplevel.configure_state = .idle; }, - .xwayland_view => |xwayland_view| { - if (view.inflight.resizing) { - view.resizeUpdatePosition( - xwayland_view.xwayland_surface.width, - xwayland_view.xwayland_surface.height, - ); + // 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) { + view.resizeUpdatePosition( + xwayland_view.xwayland_surface.width, + xwayland_view.xwayland_surface.height, + ); + } + view.inflight.box.width = xwayland_view.xwayland_surface.width; + view.inflight.box.height = xwayland_view.xwayland_surface.height; + view.pending.box.width = xwayland_view.xwayland_surface.width; + view.pending.box.height = xwayland_view.xwayland_surface.height; } - view.inflight.box.width = xwayland_view.xwayland_surface.width; - view.inflight.box.height = xwayland_view.xwayland_surface.height; - view.pending.box.width = xwayland_view.xwayland_surface.width; - view.pending.box.height = xwayland_view.xwayland_surface.height; }, .none => {}, } |
