Skip to content
21 changes: 21 additions & 0 deletions frontends/rioterm/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,11 @@ impl ApplicationHandler<EventPayload> for Application<'_> {
// Just mark dirty — damage will be extracted from
// the terminal when the renderer locks it.
ctx_item.val.renderable_content.pending_update.set_dirty();
// Skip the scheduler timer (only firable from
// `about_to_wait`, which the IME key-repeat
// message flood starves) and request the
// paint directly. Vblank pacing stays with
// the VSync worker.
route.request_redraw();
}
}
Expand Down Expand Up @@ -1940,6 +1945,22 @@ impl ApplicationHandler<EventPayload> for Application<'_> {
if route.window.screen.context_manager.current().ime.preedit()
!= preedit.as_ref()
{
// Force a full terminal repaint so the
// preedit overlay's cells re-emit on the
// next frame. Without this the grid keeps
// its previous CPU buffers and the overlay
// wouldn't refresh until something else
// damages the row.
route
.window
.screen
.context_manager
.current_mut()
.renderable_content
.pending_update
.set_terminal_damage(
rio_backend::event::TerminalDamage::Full,
);
route
.window
.screen
Expand Down
1 change: 0 additions & 1 deletion frontends/rioterm/src/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ impl<T: EventListener> Context<T> {
state: self.renderable_content.cursor.state.new_from_self(),
content: self.renderable_content.cursor.content_ref,
content_ref: self.renderable_content.cursor.content_ref,
is_ime_enabled: false,
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions frontends/rioterm/src/context/renderable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pub struct Cursor {
pub state: CursorState,
pub content: char,
pub content_ref: char,
pub is_ime_enabled: bool,
}

#[derive(Clone, Copy, Debug)]
Expand Down Expand Up @@ -145,7 +144,6 @@ impl RenderableContent {
content: config_cursor.shape.into(),
content_ref: config_cursor.shape.into(),
state: CursorState::new(config_cursor.shape.into()),
is_ime_enabled: false,
};
Self::new(cursor)
}
Expand Down
Loading
Loading