linux: fit gtk/flatpak builds

This commit is contained in:
Mitchell Hashimoto
2023-05-27 10:01:20 -07:00
parent 57d8754c85
commit 77dcc10f80
2 changed files with 2 additions and 2 deletions

View File

@ -1028,7 +1028,7 @@ pub const Surface = struct {
) callconv(.C) void {
const self = userdataSelf(ud.?);
self.cursor_pos = .{
.x = @max(0, @floatCast(f32, x)),
.x = @max(@as(f32, 0), @floatCast(f32, x)),
.y = @floatCast(f32, y),
};

View File

@ -284,7 +284,7 @@ pub const FlatpakHostCommand = struct {
// The params for our RPC call
const params = c.g_variant_new(
"(^ay^aay@a{uh}@a{ss}u)",
if (self.cwd) |cwd| cwd.ptr else g_cwd,
@as(*const anyopaque, if (self.cwd) |*cwd| cwd.ptr else g_cwd),
args,
c.g_variant_builder_end(fd_builder),
c.g_variant_builder_end(env_builder),