"Derek" reports that the DECSLPP report of window-size-in-pixels (CSI 14 t)
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Sat, 20 Dec 2008 19:43:20 +0000 (19:43 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
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.)

git-svn-id: svn://svn.tartarus.org/sgt/putty@8376 cda61777-01e9-0310-a592-d414129be87e

terminal.c

index ef40de2..19d5a75 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;