From 8bd9dbcee899eae0800772fc9fac99f0d0bed90f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 26 Mar 2024 10:37:51 +0530 Subject: [PATCH] In --debug-rendering output when SIGWINCH is sent to child --- kitty/window.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kitty/window.py b/kitty/window.py index 7f6c867b6..7cc0b73f2 100644 --- a/kitty/window.py +++ b/kitty/window.py @@ -4,6 +4,7 @@ import json import os import re +import sys import weakref from collections import deque from contextlib import contextmanager, suppress @@ -833,7 +834,10 @@ class Window: max(0, new_geometry.right - new_geometry.left), max(0, new_geometry.bottom - new_geometry.top)) update_ime_position = False if current_pty_size != self.last_reported_pty_size: - get_boss().child_monitor.resize_pty(self.id, *current_pty_size) + boss = get_boss() + boss.child_monitor.resize_pty(self.id, *current_pty_size) + if boss.args.debug_rendering: + print(f'SIGWINCH sent to child in window: {self.id} with size: {current_pty_size}', file=sys.stderr) self.last_resized_at = monotonic() if not self.pty_resized_once: self.pty_resized_once = True