1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-17 11:00:59 -05:00

Change Seat's get_char_cell_size to get_window_pixel_size.

That's more directly useful in uxpty.c (which is currently the only
actual client of the function), and also matches the data that SSH
clients send in "pty-req". Also, it makes that method behave more like
the GUI query function get_window_pixels used by terminal.c (with the
sole exception that unlike g_w_p it's allowed to return failure), so
it becomes even more trivial to implement in the GUI front ends.
This commit is contained in:
Simon Tatham
2018-10-13 07:37:24 +01:00
parent c95b277798
commit 99c215e761
9 changed files with 19 additions and 21 deletions

View File

@ -1155,12 +1155,12 @@ static void pty_size(Backend *be, int width, int height)
pty->term_width = width;
pty->term_height = height;
seat_get_char_cell_size(pty->seat, &xpixel, &ypixel);
seat_get_window_pixel_size(pty->seat, &xpixel, &ypixel);
size.ws_row = (unsigned short)pty->term_height;
size.ws_col = (unsigned short)pty->term_width;
size.ws_xpixel = (unsigned short)pty->term_width * xpixel;
size.ws_ypixel = (unsigned short)pty->term_height * ypixel;
size.ws_xpixel = (unsigned short)xpixel;
size.ws_ypixel = (unsigned short)ypixel;
ioctl(pty->master_fd, TIOCSWINSZ, (void *)&size);
return;
}