diff --git a/frontends/rioterm/src/application.rs b/frontends/rioterm/src/application.rs index b2a2a1bebb..fb4dc2c235 100644 --- a/frontends/rioterm/src/application.rs +++ b/frontends/rioterm/src/application.rs @@ -1842,7 +1842,10 @@ impl ApplicationHandler for Application<'_> { ); } - if let Some(window_update) = route.window.screen.render() { + let force_present = route.path == RoutePath::ConfirmQuit; + if let Some(window_update) = + route.window.screen.render(force_present) + { use crate::context::renderable::{ BackgroundState, WindowUpdate, }; diff --git a/frontends/rioterm/src/screen/mod.rs b/frontends/rioterm/src/screen/mod.rs index 2be9533595..9b87e2674c 100644 --- a/frontends/rioterm/src/screen/mod.rs +++ b/frontends/rioterm/src/screen/mod.rs @@ -3488,7 +3488,10 @@ impl Screen<'_> { } } - pub(crate) fn render(&mut self) -> Option { + pub(crate) fn render( + &mut self, + force_present: bool, + ) -> Option { let current_route = self.context_manager.current_route(); let (grid_cols, grid_rows) = { let terminal = self.context_manager.current().terminal.lock(); @@ -3537,7 +3540,11 @@ impl Screen<'_> { .renderer .run(&mut self.sugarloaf, &mut self.context_manager); let has_animation = self.renderer.needs_redraw(); - let should_present = any_panel_dirty || has_animation; + // `force_present` keeps immediate-mode overlays (e.g. the quit + // confirmation dialog) on screen: without it an idle terminal has + // no panel damage / animation, so the frame would be discarded and + // the overlay would flicker out. + let should_present = force_present || any_panel_dirty || has_animation; if self.renderer.custom_mouse_cursor { let scale = self.sugarloaf.scale_factor();