X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/83a421a5ec7770524c57f45bef3dcacb9dd9bfff..be3ed0da8343bdbd68665bef9a9bb096865bea04:/terminal.c diff --git a/terminal.c b/terminal.c index 3a2ab620..19d5a750 100644 --- a/terminal.c +++ b/terminal.c @@ -1223,7 +1223,7 @@ static void power_on(Terminal *term, int clear) term->erase_char = term->basic_erase_char; term->alt_which = 0; term_print_finish(term); - term->xterm_mouse = FALSE; + term->xterm_mouse = 0; set_raw_mouse_mode(term->frontend, FALSE); { int i; @@ -2385,11 +2385,11 @@ static void toggle_mode(Terminal *term, int mode, int query, int state) swap_screen(term, term->cfg.no_alt_screen ? 0 : state, FALSE, FALSE); term->disptop = 0; break; - case 1000: /* xterm mouse 1 */ + case 1000: /* xterm mouse 1 (normal) */ term->xterm_mouse = state ? 1 : 0; set_raw_mouse_mode(term->frontend, state); break; - case 1002: /* xterm mouse 2 */ + case 1002: /* xterm mouse 2 (inc. button drags) */ term->xterm_mouse = state ? 2 : 0; set_raw_mouse_mode(term->frontend, state); break; @@ -3778,7 +3778,7 @@ static void term_out(Terminal *term) if (term->ldisc) ldisc_send(term->ldisc, is_iconic(term->frontend) ? - "\033[1t" : "\033[2t", 4, 0); + "\033[2t" : "\033[1t", 4, 0); break; case 13: if (term->ldisc) { @@ -3790,7 +3790,7 @@ static void term_out(Terminal *term) case 14: if (term->ldisc) { get_window_pixels(term->frontend, &x, &y); - len = sprintf(buf, "\033[4;%d;%dt", x, y); + len = sprintf(buf, "\033[4;%d;%dt", y, x); ldisc_send(term->ldisc, buf, len, 0); } break;