Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
fix(rendering): keep captions and keyboard visible during split takeovers
Richie McIlroybd8bc3c4a863
diff --git a/crates/rendering/src/layers/cursor.rs b/crates/rendering/src/layers/cursor.rsindex 4b265d810..148b3cfa0 100644--- a/crates/rendering/src/layers/cursor.rs+++ b/crates/rendering/src/layers/cursor.rs@@ -616,7 +616,7 @@ impl CursorLayer {crate::lerp_f32(position_size[2], mapped[2], t),crate::lerp_f32(position_size[3], mapped[3], t),],- cursor_opacity * takeover.cursor_fade,+ cursor_opacity * takeover.overlay_fade,)}_ => (position_size, cursor_opacity),diff --git a/crates/rendering/src/lib.rs b/crates/rendering/src/lib.rsindex 31f9ed924..fa9d74947 100644--- a/crates/rendering/src/lib.rs+++ b/crates/rendering/src/lib.rs@@ -2784,13 +2784,15 @@ pub(crate) struct DisplayLayout {}impl ProjectUniforms {- /// 0..1 multiplier for recording-anchored overlays (captions, keyboard)- /// while a text takeover hides the recording — they would otherwise hang- /// frozen over the title card while the recording clock is paused.+ /// 0..1 multiplier for recording-anchored overlays (captions, keyboard).+ /// A Fullscreen takeover hides the recording and pauses its clock, so the+ /// overlays fade with the display — they would otherwise hang frozen over+ /// the title card. Split takeovers keep the recording visible and playing,+ /// so the overlays stay.pub fn takeover_overlay_fade(&self) -> f32 {self.takeover.as_ref()- .map_or(1.0, |takeover| 1.0 - takeover.t)+ .map_or(1.0, |takeover| takeover.overlay_fade)}pub fn frame_layout(&self) -> FrameLayout {@@ -3979,7 +3981,7 @@ impl ProjectUniforms {t: tk.t,from: pre_takeover_bounds,to: target,- cursor_fade: tk.display_fade(),+ overlay_fade: tk.display_fade(),}),)};diff --git a/crates/rendering/src/takeover.rs b/crates/rendering/src/takeover.rsindex 62dd38d7e..f91bf3d4a 100644--- a/crates/rendering/src/takeover.rs+++ b/crates/rendering/src/takeover.rs@@ -26,9 +26,10 @@ pub struct TakeoverDisplayMorph {pub t: f32,pub from: [f32; 4],pub to: [f32; 4],- /// Multiplier for the cursor sprite's opacity (fades with the display in- /// Fullscreen, stays 1 for splits where the card remains visible).- pub cursor_fade: f32,+ /// Multiplier for the cursor sprite and recording-anchored overlays+ /// (captions, keyboard): fades with the display in Fullscreen, stays 1+ /// for splits where the recording remains visible.+ pub overlay_fade: f32,}impl InterpolatedTakeover {