mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Centralise check of CONF_no_mouse_rep into Terminal.
This removes code duplication between the front ends: now the terminal itself knows when the Conf is asking it not to turn on mouse reporting, and the front ends can assume that if the terminal asks them to then they should just do it. This also makes the behaviour on mid-session reconfiguration more sensible, in both code organisation and consistent behaviour. Previously, term_reconfig would detect that CONF_no_mouse_rep had been *set* in mid-session, and turn off mouse reporting mode in response. But it would do it by clearing term->xterm_mouse, which isn't how the front end enabled and disabled that feature, so things could get into different states from different sequences of events that should have ended up in the same place. Also, the terminal wouldn't re-enable mouse reporting if CONF_no_mouse_rep was *cleared* and the currently running terminal app had been asking for mouse reports all along. Also, it was silly to have half the CONF_no_mouse_rep handling in term_reconfig and the other half in the front ends. Now it should all be sensible, and also all centralised. term->xterm_mouse consistently tracks whether the terminal application is _requesting_ mouse reports; term->xterm_mouse_forbidden tracks whether the client user is vetoing them; every change to either one of those settings triggers a call to term_update_raw_mouse_mode which sets up the front end appropriately for the current combination.
This commit is contained in:
@ -2403,7 +2403,6 @@ static void gtk_seat_set_busy_status(Seat *seat, BusyStatus status)
|
||||
static void gtkwin_set_raw_mouse_mode(TermWin *tw, bool activate)
|
||||
{
|
||||
GtkFrontend *inst = container_of(tw, GtkFrontend, termwin);
|
||||
activate = activate && !conf_get_bool(inst->conf, CONF_no_mouse_rep);
|
||||
inst->send_raw_mouse = activate;
|
||||
update_mouseptr(inst);
|
||||
}
|
||||
|
Reference in New Issue
Block a user