]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
"Derek" reports that the DECSLPP report of window-size-in-pixels (CSI 14 t)
authorJacob Nevins <jacobn@chiark.greenend.org.uk>
Sat, 20 Dec 2008 19:43:20 +0000 (19:43 +0000)
committerJacob Nevins <jacobn@chiark.greenend.org.uk>
Sat, 20 Dec 2008 19:43:20 +0000 (19:43 +0000)
has width and height swapped. Since both a random xterm I have and
<http://invisible-island.net/xterm/ctlseqs/ctlseqs.txt> agree with him, I've
changed ours. (This stuff appears to originate in dtterm, but I can't check the
behaviour of that right now.)

While I'm here, the are-we-iconified report (CSI 11 t) looks to have the
wrong sense compared to the same sources, so swap that too.

(All this has been this way since it was originally implemented in r1414,
which doesn't cite a source. all-escapes is silent too.)

[originally from svn r8376]
[r1414 == bb1f5cec3188fd1e0329425212c149959151450e]

terminal.c

index ef40de2b19055d38a1801f5c3036564918bd39c5..19d5a750972415519f554c118fb6f39af09d6a9a 100644 (file)
@@ -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;