X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/0fab03157f12ec8fa28404700cd7bbb67c26b8c2..5ea184d1f9e8ce59e60297f4469912722f7c722e:/terminal.c diff --git a/terminal.c b/terminal.c index ef40de2b..4f0d8225 100644 --- a/terminal.c +++ b/terminal.c @@ -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; @@ -5942,7 +5942,7 @@ void term_key(Terminal *term, Key_Sym keysym, wchar_t *text, size_t tlen, if (modifiers & PKM_CONTROL) c &= 0x1f; else if (modifiers & PKM_SHIFT) - c = toupper(c); + c = toupper((unsigned char)c); } *p++ = c; goto done;