fix(renderer): kitty image z-index accounting
The previous logic would consider all images fg if the only present placements were bg, or consider mg images fg if there were no fg.pull/7671/head
parent
4c3ab14571
commit
1da40ccbac
|
|
@ -1672,8 +1672,8 @@ pub fn Renderer(comptime GraphicsAPI: type) type {
|
||||||
}.lessThan,
|
}.lessThan,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Find our indices. The values are sorted by z so we can find the
|
// Find our indices. The values are sorted by z so we can
|
||||||
// first placement out of bounds to find the limits.
|
// find the first placement out of bounds to find the limits.
|
||||||
var bg_end: ?u32 = null;
|
var bg_end: ?u32 = null;
|
||||||
var text_end: ?u32 = null;
|
var text_end: ?u32 = null;
|
||||||
const bg_limit = std.math.minInt(i32) / 2;
|
const bg_limit = std.math.minInt(i32) / 2;
|
||||||
|
|
@ -1686,8 +1686,14 @@ pub fn Renderer(comptime GraphicsAPI: type) type {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.image_bg_end = bg_end orelse 0;
|
// If we didn't see any images with a z > the bg limit,
|
||||||
self.image_text_end = text_end orelse self.image_bg_end;
|
// then our bg end is the end of our placement list.
|
||||||
|
self.image_bg_end =
|
||||||
|
bg_end orelse @intCast(self.image_placements.items.len);
|
||||||
|
|
||||||
|
// Same idea for the image_text_end.
|
||||||
|
self.image_text_end =
|
||||||
|
text_end orelse @intCast(self.image_placements.items.len);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn prepKittyVirtualPlacement(
|
fn prepKittyVirtualPlacement(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue