(
&mut self,
channel: ChannelId,
col_width: u32,
row_height: u32,
pixel_width: u32,
pixel_height: u32,
_session: &mut Session,
)
| 388 | } |
| 389 | |
| 390 | async fn window_change_request( |
| 391 | &mut self, |
| 392 | channel: ChannelId, |
| 393 | col_width: u32, |
| 394 | row_height: u32, |
| 395 | pixel_width: u32, |
| 396 | pixel_height: u32, |
| 397 | _session: &mut Session, |
| 398 | ) -> Result<(), Self::Error> { |
| 399 | let Some(state) = self.channels.get(&channel) else { |
| 400 | warn!("window_change_request on unknown channel {channel:?}"); |
| 401 | return Ok(()); |
| 402 | }; |
| 403 | if let Some(master) = state.pty_master.as_ref() { |
| 404 | let winsize = Winsize { |
| 405 | ws_row: to_u16(row_height.max(1)), |
| 406 | ws_col: to_u16(col_width.max(1)), |
| 407 | ws_xpixel: to_u16(pixel_width), |
| 408 | ws_ypixel: to_u16(pixel_height), |
| 409 | }; |
| 410 | if let Err(e) = unsafe_pty::set_winsize(master.as_raw_fd(), winsize) { |
| 411 | warn!("failed to resize PTY for channel {channel:?}: {e}"); |
| 412 | } |
| 413 | } |
| 414 | Ok(()) |
| 415 | } |
| 416 | |
| 417 | async fn shell_request( |
| 418 | &mut self, |
nothing calls this directly
no test coverage detected