This commit is contained in:
Kovid Goyal 2017-09-13 14:27:56 +05:30
parent c683725434
commit 240c683504
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 8 deletions

View File

@ -101,11 +101,6 @@ class Boss:
self.window_id_map[window.id] = window
wakeup()
def resize_pty(self, window_id):
w = self.window_id_map.get(window_id)
if w is not None:
self.child_monitor.resize_pty(window_id, *w.current_pty_size)
def on_child_death(self, window_id):
w = self.window_id_map.pop(window_id, None)
if w is not None:

View File

@ -57,7 +57,6 @@ class Window:
self.child, self.opts = child, opts
self.screen = Screen(self, 24, 80, opts.scrollback_lines)
self.char_grid = CharGrid(self.screen, opts)
self.current_pty_size = None
def __repr__(self):
return 'Window(title={}, id={})'.format(self.title, self.id)
@ -80,12 +79,12 @@ class Window:
if self.needs_layout or new_geometry.xnum != self.screen.columns or new_geometry.ynum != self.screen.lines:
boss = get_boss()
self.screen.resize(new_geometry.ynum, new_geometry.xnum)
self.current_pty_size = (
current_pty_size = (
self.screen.lines, self.screen.columns,
max(0, new_geometry.right - new_geometry.left), max(0, new_geometry.bottom - new_geometry.top))
sg = self.char_grid.update_position(new_geometry)
self.needs_layout = False
boss.resize_pty(self.id)
boss.child_monitor.resize_pty(self.id, *current_pty_size)
else:
sg = self.char_grid.update_position(new_geometry)
set_window_render_data(self.tab_id, window_idx, self.vao_id, sg.xstart, sg.ystart, sg.dx, sg.dy, self.screen)