From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 19A99385702F; Wed, 7 Jul 2021 11:39:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 19A99385702F Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] tty/pty: support TIOCSWINSZ pixel-size-only change notification X-Act-Checkin: newlib-cygwin X-Git-Author: Thomas Wolff X-Git-Refname: refs/heads/master X-Git-Oldrev: 4fca7b0da623cf109cf47468f34c8c4d4f59f6b2 X-Git-Newrev: 1290301b893189b50569ac9b43a62afd65e0e064 Message-Id: <20210707113949.19A99385702F@sourceware.org> Date: Wed, 7 Jul 2021 11:39:49 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jul 2021 11:39:49 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=1290301b893189b50569ac9b43a62afd65e0e064 commit 1290301b893189b50569ac9b43a62afd65e0e064 Author: Thomas Wolff Date: Sat Jul 3 00:00:00 2021 +0200 tty/pty: support TIOCSWINSZ pixel-size-only change notification xterm 368 and mintty 3.5.1 implement a new feature to support notification of terminal scaling via font zooming also if the terminal text dimensions (rows/columns) stay unchanged, using ioctl(TIOCSWINSZ), raising SIGWINCH; this patches cygwin to support that scenario Diff: --- winsup/cygwin/fhandler_tty.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 1ed41d3b2..f2ac26892 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1687,7 +1687,10 @@ fhandler_pty_slave::ioctl (unsigned int cmd, void *arg) break; case TIOCSWINSZ: if (get_ttyp ()->winsize.ws_row != ((struct winsize *) arg)->ws_row - || get_ttyp ()->winsize.ws_col != ((struct winsize *) arg)->ws_col) + || get_ttyp ()->winsize.ws_col != ((struct winsize *) arg)->ws_col + || get_ttyp ()->winsize.ws_ypixel != ((struct winsize *) arg)->ws_ypixel + || get_ttyp ()->winsize.ws_xpixel != ((struct winsize *) arg)->ws_xpixel + ) { if (get_ttyp ()->pcon_activated && get_ttyp ()->pcon_pid) resize_pseudo_console ((struct winsize *) arg); @@ -2279,7 +2282,10 @@ fhandler_pty_master::ioctl (unsigned int cmd, void *arg) break; case TIOCSWINSZ: if (get_ttyp ()->winsize.ws_row != ((struct winsize *) arg)->ws_row - || get_ttyp ()->winsize.ws_col != ((struct winsize *) arg)->ws_col) + || get_ttyp ()->winsize.ws_col != ((struct winsize *) arg)->ws_col + || get_ttyp ()->winsize.ws_ypixel != ((struct winsize *) arg)->ws_ypixel + || get_ttyp ()->winsize.ws_xpixel != ((struct winsize *) arg)->ws_xpixel + ) { if (get_ttyp ()->pcon_activated && get_ttyp ()->pcon_pid) resize_pseudo_console ((struct winsize *) arg);