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:
parent
4fca7b0da6
commit
1290301b89
|
@ -1687,7 +1687,10 @@ fhandler_pty_slave::ioctl (unsigned int cmd, void *arg)
|
||||||
break;
|
break;
|
||||||
case TIOCSWINSZ:
|
case TIOCSWINSZ:
|
||||||
if (get_ttyp ()->winsize.ws_row != ((struct winsize *) arg)->ws_row
|
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)
|
if (get_ttyp ()->pcon_activated && get_ttyp ()->pcon_pid)
|
||||||
resize_pseudo_console ((struct winsize *) arg);
|
resize_pseudo_console ((struct winsize *) arg);
|
||||||
|
@ -2279,7 +2282,10 @@ fhandler_pty_master::ioctl (unsigned int cmd, void *arg)
|
||||||
break;
|
break;
|
||||||
case TIOCSWINSZ:
|
case TIOCSWINSZ:
|
||||||
if (get_ttyp ()->winsize.ws_row != ((struct winsize *) arg)->ws_row
|
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)
|
if (get_ttyp ()->pcon_activated && get_ttyp ()->pcon_pid)
|
||||||
resize_pseudo_console ((struct winsize *) arg);
|
resize_pseudo_console ((struct winsize *) arg);
|
||||||
|
|
Loading…
Reference in New Issue