From 10f632664989117afe6d4496a419f712fbb4c3b6 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Tue, 24 Jul 2018 19:31:45 +1200 Subject: [PATCH] Redraw on SIGWINCH when screen size hasn't changed Some programs and users send SIGWINCH as a request for the client to redraw in the event of session detachment/reattachment (e.g. abduco). A well-formed terminal will only send SIGWINCH when the window size has changed, so there is no need to optimise this case out. --- src/fe-text/term.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/fe-text/term.c b/src/fe-text/term.c index 4600f02e..408dc7ef 100644 --- a/src/fe-text/term.c +++ b/src/fe-text/term.c @@ -81,11 +81,9 @@ void term_resize_dirty(void) if (!term_get_size(&width, &height)) width = height = -1; - if (height != term_height || width != term_width) { - term_resize(width, height); - mainwindows_resize(term_width, term_height); - term_resize_final(width, height); - } + term_resize(width, height); + mainwindows_resize(term_width, term_height); + term_resize_final(width, height); } #ifdef SIGWINCH