termio: wake renderer outside of critical area in resize

This commit is contained in:
Qwerasd
2024-08-14 23:46:52 -04:00
parent 900aab10f2
commit ff6a0bf9a2

View File

@ -378,6 +378,12 @@ pub fn resize(
// immediately for a resize. This is allowed by the spec.
self.terminal.modes.set(.synchronized_output, false);
// If we have size reporting enabled we need to send a report.
if (self.terminal.modes.get(.in_band_size_reports)) {
try self.sizeReportLocked(td, .mode_2048);
}
}
// Mail the renderer so that it can update the GPU and re-render
_ = self.renderer_mailbox.push(.{
.resize = .{
@ -386,12 +392,6 @@ pub fn resize(
},
}, .{ .forever = {} });
self.renderer_wakeup.notify() catch {};
// If we have size reporting enabled we need to send a report.
if (self.terminal.modes.get(.in_band_size_reports)) {
try self.sizeReportLocked(td, .mode_2048);
}
}
}
/// Make a size report.