Skip to content

Commit

Permalink
Merge branch 'render'
Browse files Browse the repository at this point in the history
  • Loading branch information
raphamorim committed Jan 12, 2025
2 parents 9acb347 + a6ca12d commit 970d8ce
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/docs/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ language: 'en'
- `COLUMNS`: current columns
- `LINES`: current lines
- So, for example if you have: `{{COLUMNS}}x{{LINES}}` would show something like `88x66`.
- Perf improvement on text selection [#898](https://github.com/raphamorim/rio/pull/898) by [@marc2332](https://github.com/marc2332).
- Window title is now updated regardless the Navigation Mode.
- Performance: Background and foreground data are only retrieved if is asked (either color automation is enabled or `window.title` contains any request for it).
- Fixed: Nix build [#853](https://github.com/raphamorim/rio/pull/853).
Expand Down
8 changes: 4 additions & 4 deletions frontends/rioterm/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ impl ApplicationHandler<EventPayload> for Application<'_> {
}

route.window.winit_window.set_cursor(CursorIcon::Pointer);
route.window.screen.context_manager.schedule_render(60);
route.window.screen.context_manager.request_render();
}
}

Expand Down Expand Up @@ -867,7 +867,7 @@ impl ApplicationHandler<EventPayload> for Application<'_> {

if route.window.screen.search_nearest_hyperlink_from_pos() {
route.window.winit_window.set_cursor(CursorIcon::Pointer);
route.window.screen.context_manager.schedule_render(60);
route.window.screen.context_manager.request_render();
} else {
let cursor_icon =
if !route.window.screen.modifiers.state().shift_key()
Expand All @@ -894,7 +894,7 @@ impl ApplicationHandler<EventPayload> for Application<'_> {
.context_manager
.current_mut()
.set_hyperlink_range(None);
route.window.screen.context_manager.schedule_render(60);
route.window.screen.context_manager.request_render();
}
}

Expand All @@ -906,7 +906,7 @@ impl ApplicationHandler<EventPayload> for Application<'_> {
|| !route.window.screen.mouse_mode())
{
route.window.screen.update_selection(point, square_side);
route.window.screen.context_manager.schedule_render(60);
route.window.screen.context_manager.request_render();
} else if square_changed
&& route.window.screen.has_mouse_motion_and_drag()
{
Expand Down
4 changes: 2 additions & 2 deletions frontends/rioterm/src/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,9 @@ impl<T: EventListener + Clone + std::marker::Send + 'static> ContextManager<T> {
}

#[inline]
pub fn schedule_render(&mut self, scheduled_time: u64) {
pub fn request_render(&mut self) {
self.event_proxy
.send_event(RioEvent::PrepareRender(scheduled_time), self.window_id);
.send_event(RioEvent::RenderRoute(self.current_route), self.window_id);
}

#[inline]
Expand Down

0 comments on commit 970d8ce

Please sign in to comment.