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
This commit is contained in:
Thomas Wolff 2021-07-03 00:00:00 +02:00 committed by Corinna Vinschen
parent 4fca7b0da6
commit 1290301b89
1 changed files with 8 additions and 2 deletions

View File

@ -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);