Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion frontends/rioterm/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1842,7 +1842,10 @@ impl ApplicationHandler<EventPayload> 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,
};
Expand Down
11 changes: 9 additions & 2 deletions frontends/rioterm/src/screen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3488,7 +3488,10 @@ impl Screen<'_> {
}
}

pub(crate) fn render(&mut self) -> Option<crate::context::renderable::WindowUpdate> {
pub(crate) fn render(
&mut self,
force_present: bool,
) -> Option<crate::context::renderable::WindowUpdate> {
let current_route = self.context_manager.current_route();
let (grid_cols, grid_rows) = {
let terminal = self.context_manager.current().terminal.lock();
Expand Down Expand Up @@ -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();
Expand Down
Loading