diff --git a/zellij-server/src/tab.rs b/zellij-server/src/tab.rs index 2f6465742..16e196a1d 100644 --- a/zellij-server/src/tab.rs +++ b/zellij-server/src/tab.rs @@ -385,6 +385,7 @@ impl Tab { for geom in boundary_geom { self.offset_viewport(&geom) } + self.set_pane_frames(self.draw_pane_frames); // This is the end of the nasty viewport hack... // FIXME: Active / new / current terminal, should be pane self.active_terminal = self.panes.iter().map(|(id, _)| id.to_owned()).next(); @@ -1642,7 +1643,7 @@ impl Tab { }) } pub fn relayout_tab(&mut self, direction: Direction) { - let mut resizer = PaneResizer::new(&mut self.panes.iter_mut(), &mut self.os_api); + let mut resizer = PaneResizer::new(self.panes.iter_mut()); let result = match direction { Direction::Horizontal => resizer.layout(direction, self.display_area.cols), Direction::Vertical => resizer.layout(direction, self.display_area.rows), @@ -1662,7 +1663,7 @@ impl Tab { .iter_mut() .filter(|(pid, _)| !temp_panes_to_hide.contains(pid)); let Size { rows, cols } = new_screen_size; - let mut resizer = PaneResizer::new(panes, &mut self.os_api); + let mut resizer = PaneResizer::new(panes); if resizer.layout(Direction::Horizontal, cols).is_ok() { let column_difference = cols as isize - self.display_area.cols as isize; // FIXME: Should the viewport be an Offset? diff --git a/zellij-server/src/ui/pane_resizer.rs b/zellij-server/src/ui/pane_resizer.rs index 0213f6d52..76153597c 100644 --- a/zellij-server/src/ui/pane_resizer.rs +++ b/zellij-server/src/ui/pane_resizer.rs @@ -1,4 +1,4 @@ -use crate::{os_input_output::ServerOsApi, panes::PaneId, tab::Pane}; +use crate::{panes::PaneId, tab::Pane}; use cassowary::{ strength::{REQUIRED, STRONG}, Expression, Solver, Variable, @@ -12,7 +12,6 @@ use zellij_utils::{ pub struct PaneResizer<'a> { panes: HashMap<&'a PaneId, &'a mut Box>, - os_api: &'a mut Box, vars: HashMap, solver: Solver, } @@ -31,10 +30,7 @@ struct Span { type Grid = Vec>; impl<'a> PaneResizer<'a> { - pub fn new( - panes: impl Iterator)>, - os_api: &'a mut Box, - ) -> Self { + pub fn new(panes: impl Iterator)>) -> Self { let panes: HashMap<_, _> = panes.collect(); let mut vars = HashMap::new(); for &&k in panes.keys() { @@ -42,7 +38,6 @@ impl<'a> PaneResizer<'a> { } PaneResizer { panes, - os_api, vars, solver: Solver::new(), } @@ -146,13 +141,6 @@ impl<'a> PaneResizer<'a> { } else { pane.set_geom(new_geom); } - if let PaneId::Terminal(pid) = pane.pid() { - self.os_api.set_terminal_size_using_fd( - pid, - pane.get_content_columns() as u16, - pane.get_content_rows() as u16, - ); - } } }