Remove the wl_output.mode listener

wl_output.mode provides the physical dimensions of the output, whereas
river_output_v1.dimensions provides the logical dimensions. In general,
we use the logical coordinates from the dimensions event except for a
few places where we do the scale math on the buffers. So, mode was
fairly useless. If I find a need in the future, I can add it back (but
not set the output width/height in it).
This commit is contained in:
Ben Buhse 2026-02-28 15:57:42 -06:00
commit 1145aad356
No known key found for this signature in database
GPG key ID: 7916ACFCD38FD0B4

View file

@ -269,16 +269,6 @@ fn riverOutputListener(river_output_v1: *river.OutputV1, event: river.OutputV1.E
// Used for the wl_output global interface that corresponds to the river_output_v1 // Used for the wl_output global interface that corresponds to the river_output_v1
fn wlOutputListener(_: *wl.Output, event: wl.Output.Event, output: *Output) void { fn wlOutputListener(_: *wl.Output, event: wl.Output.Event, output: *Output) void {
switch (event) { switch (event) {
.mode => |ev| {
if (ev.width < 0 or ev.height < 0) {
// I'm not actually sure if this is possible, but just to be safe
log.warn("Received wl_output.mode event with a negative width or height ({d}x{d})", .{ ev.width, ev.height });
return;
}
output.geometry.width = @intCast(ev.width);
output.geometry.height = @intCast(ev.height);
},
.done => { .done => {
output.initWallpaperLayerSurface() catch |err| { output.initWallpaperLayerSurface() catch |err| {
const output_name = output.name orelse "some output"; const output_name = output.name orelse "some output";