mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Add a new seat method to return the cursor position.
The motivation is for the SUPDUP protocol. The server may send a signal for the terminal to reset any input buffers. After this, the server will not know the state of the terminal, so it is required to send its cursor position back.
This commit is contained in:

committed by
Simon Tatham

parent
1efded20a1
commit
a8bb6456d1
@ -336,6 +336,7 @@ static void win_seat_connection_fatal(Seat *seat, const char *msg);
|
||||
static void win_seat_update_specials_menu(Seat *seat);
|
||||
static void win_seat_set_busy_status(Seat *seat, BusyStatus status);
|
||||
static bool win_seat_set_trust_status(Seat *seat, bool trusted);
|
||||
static bool win_seat_get_cursor_position(Seat *seat, int *x, int *y);
|
||||
|
||||
static const SeatVtable win_seat_vt = {
|
||||
win_seat_output,
|
||||
@ -358,6 +359,7 @@ static const SeatVtable win_seat_vt = {
|
||||
win_seat_set_trust_status,
|
||||
nullseat_verbose_yes,
|
||||
nullseat_interactive_yes,
|
||||
win_seat_get_cursor_position,
|
||||
};
|
||||
static WinGuiSeat wgs = { .seat.vt = &win_seat_vt,
|
||||
.logpolicy.vt = &win_gui_logpolicy_vt };
|
||||
@ -5801,3 +5803,9 @@ static bool win_seat_set_trust_status(Seat *seat, bool trusted)
|
||||
term_set_trust_status(term, trusted);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool win_seat_get_cursor_position(Seat *seat, int *x, int *y)
|
||||
{
|
||||
term_get_cursor_position(term, x, y);
|
||||
return true;
|
||||
}
|
||||
|
@ -101,6 +101,7 @@ static const SeatVtable plink_seat_vt = {
|
||||
console_set_trust_status,
|
||||
cmdline_seat_verbose,
|
||||
plink_seat_interactive,
|
||||
nullseat_get_cursor_position,
|
||||
};
|
||||
static Seat plink_seat[1] = {{ &plink_seat_vt }};
|
||||
|
||||
|
Reference in New Issue
Block a user