mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 19:42:48 -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:
@ -245,10 +245,9 @@ char *win_seat_get_ttymode(Seat *seat, const char *mode)
|
||||
return term_get_ttymode(term, mode);
|
||||
}
|
||||
|
||||
int win_seat_get_char_cell_size(Seat *seat, int *x, int *y)
|
||||
int win_seat_get_window_pixel_size(Seat *seat, int *x, int *y)
|
||||
{
|
||||
*x = font_width;
|
||||
*y = font_height;
|
||||
get_window_pixels(NULL, x, y);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -277,7 +276,7 @@ static const SeatVtable win_seat_vt = {
|
||||
nullseat_echoedit_update,
|
||||
nullseat_get_x_display,
|
||||
nullseat_get_windowid,
|
||||
win_seat_get_char_cell_size,
|
||||
win_seat_get_window_pixel_size,
|
||||
};
|
||||
Seat win_seat[1] = {{ &win_seat_vt }};
|
||||
|
||||
|
@ -103,7 +103,7 @@ static const SeatVtable plink_seat_vt = {
|
||||
plink_echoedit_update,
|
||||
nullseat_get_x_display,
|
||||
nullseat_get_windowid,
|
||||
nullseat_get_char_cell_size,
|
||||
nullseat_get_window_pixel_size,
|
||||
};
|
||||
static Seat plink_seat[1] = {{ &plink_seat_vt }};
|
||||
|
||||
|
Reference in New Issue
Block a user