Skip to content

Commit eabb3b1

Browse files
committed
fixup! drop snapshots
1 parent 15f8830 commit eabb3b1

File tree

4 files changed

+24
-26
lines changed

4 files changed

+24
-26
lines changed

frontends/rioterm/src/application.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,16 +1264,12 @@ impl ApplicationHandler<EventPayload> for Application<'_> {
12641264
.pending_update
12651265
.is_dirty()
12661266
{
1267-
route.request_redraw();
1267+
route.schedule_redraw(
1268+
&mut self.scheduler,
1269+
route.window.screen.ctx().current_route(),
1270+
);
12681271
}
12691272

1270-
// route.request_redraw();
1271-
1272-
// route.schedule_redraw(
1273-
// &mut self.scheduler,
1274-
// route.window.screen.ctx().current_route(),
1275-
// );
1276-
12771273
event_loop.set_control_flow(ControlFlow::Wait);
12781274
}
12791275
_ => {}

frontends/rioterm/src/context/mod.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,13 @@ impl<T: EventListener + Clone + std::marker::Send + 'static> ContextManager<T> {
283283
}
284284
}
285285

286-
let machine =
287-
Machine::new(Arc::clone(&terminal), pty, event_proxy.clone(), window_id, route_id)?;
286+
let machine = Machine::new(
287+
Arc::clone(&terminal),
288+
pty,
289+
event_proxy.clone(),
290+
window_id,
291+
route_id,
292+
)?;
288293
let channel = machine.channel();
289294
let io_thread = if config.spawn_performer {
290295
Some(machine.spawn())

frontends/rioterm/src/context/renderable.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ impl PendingUpdate {
114114
self.dirty = true;
115115
}
116116

117-
118-
119117
/// Mark as needing update.
120118
/// The actual snapshot will be computed at render time.
121119
pub fn invalidate<U: rio_backend::event::EventListener>(
@@ -138,8 +136,6 @@ impl PendingUpdate {
138136
pub fn reset(&mut self) {
139137
self.dirty = false;
140138
}
141-
142-
143139
}
144140

145141
#[cfg(test)]

rio-backend/src/performer/mod.rs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub struct Machine<T: teletypewriter::EventedPty, U: EventListener> {
6868
terminal: Arc<FairMutex<Crosswords<U>>>,
6969
event_proxy: U,
7070
window_id: WindowId,
71-
route_id: usize
71+
route_id: usize,
7272
}
7373

7474
#[derive(Default)]
@@ -220,16 +220,16 @@ where
220220
// multiple rapid updates into a single render pass.
221221
if state.parser.sync_bytes_count() < processed && processed > 0 {
222222
// Check if there's any damage to process
223-
// if terminal.peek_damage_event().is_some() {
224-
// terminal.emit_damage_event();
225-
tracing::trace!(
226-
"PTY read: Sending Wakeup event for {} bytes of non-sync data",
227-
processed
228-
);
229-
// Send a Wakeup event to coalesce renders
230-
self.event_proxy
231-
.send_event(RioEvent::Wakeup(self.route_id), self.window_id);
232-
// }
223+
// if terminal.peek_damage_event().is_some() {
224+
// terminal.emit_damage_event();
225+
tracing::trace!(
226+
"PTY read: Sending Wakeup event for {} bytes of non-sync data",
227+
processed
228+
);
229+
// Send a Wakeup event to coalesce renders
230+
self.event_proxy
231+
.send_event(RioEvent::Wakeup(self.route_id), self.window_id);
232+
// }
233233
}
234234

235235
Ok(())
@@ -358,7 +358,8 @@ where
358358
state.parser.stop_sync(&mut *terminal);
359359

360360
// Emit damage event if there's any damage after processing sync buffer
361-
self.event_proxy.send_event(RioEvent::Wakeup(self.route_id), self.window_id);
361+
self.event_proxy
362+
.send_event(RioEvent::Wakeup(self.route_id), self.window_id);
362363

363364
continue;
364365
}

0 commit comments

Comments
 (0)