river: update to wlroots 0.16

This commit is contained in:
Isaac Freund
2022-11-11 20:25:21 +01:00
parent 5eb0e23780
commit 489a49735a
34 changed files with 289 additions and 369 deletions

View File

@ -18,6 +18,7 @@ const Self = @This();
const std = @import("std");
const assert = std.debug.assert;
const math = std.math;
const mem = std.mem;
const wlr = @import("wlroots");
const wayland = @import("wayland");
@ -27,7 +28,6 @@ const river = wayland.server.river;
const server = &@import("main.zig").server;
const util = @import("util.zig");
const Box = @import("Box.zig");
const Server = @import("Server.zig");
const Output = @import("Output.zig");
const View = @import("View.zig");
@ -111,8 +111,8 @@ pub fn startLayoutDemand(self: *Self, views: u32) void {
self.layout.sendLayoutDemand(
views,
self.output.usable_box.width,
self.output.usable_box.height,
@intCast(u32, self.output.usable_box.width),
@intCast(u32, self.output.usable_box.height),
self.output.pending.tags,
self.output.layout_demand.?.serial,
);
@ -137,7 +137,13 @@ fn handleRequest(layout: *river.LayoutV3, request: river.LayoutV3.Request, self:
// because we do not keep track of old serials server-side.
// Therefore, simply ignore requests with old/wrong serials.
if (layout_demand.serial != req.serial) return;
layout_demand.pushViewDimensions(self.output, req.x, req.y, req.width, req.height);
layout_demand.pushViewDimensions(
self.output,
req.x,
req.y,
@intCast(u31, math.min(math.maxInt(u31), req.width)),
@intCast(u31, math.min(math.maxInt(u31), req.height)),
);
}
},