View: clean up after Zig update
This commit is contained in:
parent
2e586c7061
commit
5690c833e9
@ -297,22 +297,17 @@ pub fn updateCurrent(view: *Self) void {
|
|||||||
}
|
}
|
||||||
xdg_toplevel.configure_state = .idle;
|
xdg_toplevel.configure_state = .idle;
|
||||||
},
|
},
|
||||||
// TODO(zig): this capture does not need to be mutable and the if (build_options.xwayland)
|
.xwayland_view => |xwayland_view| {
|
||||||
// is unnecessary. However, zig 0.10.0 is buggy and these work around a bug. They are both
|
if (view.inflight.resizing) {
|
||||||
// fixed in zig 0.10.1 and newer but we currently rely on 0.10.0 for FreeBSD CI.
|
view.resizeUpdatePosition(
|
||||||
.xwayland_view => |*xwayland_view| {
|
xwayland_view.xwayland_surface.width,
|
||||||
if (build_options.xwayland) {
|
xwayland_view.xwayland_surface.height,
|
||||||
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 => {},
|
.none => {},
|
||||||
}
|
}
|
||||||
@ -361,12 +356,7 @@ pub fn configure(self: *Self) bool {
|
|||||||
assert(self.mapped and !self.destroying);
|
assert(self.mapped and !self.destroying);
|
||||||
switch (self.impl) {
|
switch (self.impl) {
|
||||||
.xdg_toplevel => |*xdg_toplevel| return xdg_toplevel.configure(),
|
.xdg_toplevel => |*xdg_toplevel| return xdg_toplevel.configure(),
|
||||||
.xwayland_view => |*xwayland_view| {
|
.xwayland_view => |*xwayland_view| return xwayland_view.configure(),
|
||||||
// TODO(zig): remove this uneeded if statement
|
|
||||||
// https://github.com/ziglang/zig/issues/13655
|
|
||||||
if (build_options.xwayland) return xwayland_view.configure();
|
|
||||||
unreachable;
|
|
||||||
},
|
|
||||||
.none => unreachable,
|
.none => unreachable,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user