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