[Ttssh2-commit] [4250] ウィンドウサイズ変更制御シーケンスに対して、実際のウィンドウサイズを返すようにした。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 12月 22日 (水) 15:27:26 JST


Revision: 4250
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=4250
Author:   doda
Date:     2010-12-22 15:27:26 +0900 (Wed, 22 Dec 2010)

Log Message:
-----------
ウィンドウサイズ変更制御シーケンスに対して、実際のウィンドウサイズを返すようにした。

Modified Paths:
--------------
    trunk/doc/en/html/about/history.html
    trunk/doc/ja/html/about/history.html
    trunk/teraterm/teraterm/vtdisp.c
    trunk/teraterm/teraterm/vtdisp.h
    trunk/teraterm/teraterm/vtterm.c


-------------- next part --------------
Modified: trunk/doc/en/html/about/history.html
===================================================================
--- trunk/doc/en/html/about/history.html	2010-12-21 13:38:14 UTC (rev 4249)
+++ trunk/doc/en/html/about/history.html	2010-12-22 06:27:26 UTC (rev 4250)
@@ -45,6 +45,7 @@
         </ul></li>
       <li>addes support for the DECRQSS (Request terminal setting) control sequence. Supported control sequences are DECSCA, DECSCL, DECSTBM and SGR.</li>
       <li>added support for the DECFI, DECBI control sequences.</li>
+      <!-- li>ƒEƒBƒ“ƒhƒEƒTƒCƒY–â‚¢‡‚킹§ŒäƒV[ƒPƒ“ƒX‚ɑ΂µ‚ďí‚É480x640‚ð‰ž“š‚µ‚Ä‚¢‚½‚Ì‚ðAŽÀÛ‚̃EƒBƒ“ƒhƒEƒTƒCƒY‚ð•Ô‚·‚悤‚ɕύX‚µ‚½B</li -->
     </ul>
   </li>
 

Modified: trunk/doc/ja/html/about/history.html
===================================================================
--- trunk/doc/ja/html/about/history.html	2010-12-21 13:38:14 UTC (rev 4249)
+++ trunk/doc/ja/html/about/history.html	2010-12-22 06:27:26 UTC (rev 4250)
@@ -45,6 +45,7 @@
         </ul></li>
       <li>DECRQSS(Ý’è–â‚¢‡‚킹)§ŒäƒV[ƒPƒ“ƒX‚ɑΉž‚µ‚½B–â‚¢‡‚킹‚ɑΉž‚µ‚Ä‚¢‚éÝ’è‚Í DECSCA, DECSCL, DECSTBM, SGRB</li>
       <li>DECFI, DECBI §ŒäƒV[ƒPƒ“ƒX‚ɑΉž‚µ‚½B</li>
+      <li>ƒEƒBƒ“ƒhƒEƒTƒCƒY–â‚¢‡‚킹§ŒäƒV[ƒPƒ“ƒX‚ɑ΂µ‚ďí‚É480x640‚ð‰ž“š‚µ‚Ä‚¢‚½‚Ì‚ðAŽÀÛ‚̃EƒBƒ“ƒhƒEƒTƒCƒY‚ð•Ô‚·‚悤‚ɕύX‚µ‚½B</li>
     </ul>
   </li>
 

Modified: trunk/teraterm/teraterm/vtdisp.c
===================================================================
--- trunk/teraterm/teraterm/vtdisp.c	2010-12-21 13:38:14 UTC (rev 4249)
+++ trunk/teraterm/teraterm/vtdisp.c	2010-12-22 06:27:26 UTC (rev 4250)
@@ -3487,6 +3487,16 @@
 	return;
 }
 
+void DispGetWindowSize(int *width, int *height) {
+	RECT r;
+
+	GetWindowRect(HVTWin, &r);
+	*width = r.right - r.left;
+	*height = r.bottom - r.top;
+
+	return;
+}
+
 void DispGetRootWinSize(int *x, int *y)
 {
 	HMODULE mod;

Modified: trunk/teraterm/teraterm/vtdisp.h
===================================================================
--- trunk/teraterm/teraterm/vtdisp.h	2010-12-21 13:38:14 UTC (rev 4249)
+++ trunk/teraterm/teraterm/vtdisp.h	2010-12-22 06:27:26 UTC (rev 4250)
@@ -86,6 +86,7 @@
 void DispResizeWin(int w, int h);
 BOOL DispWindowIconified();
 void DispGetWindowPos(int *x, int *y);
+void DispGetWindowSize(int *width, int *height);
 void DispGetRootWinSize(int *x, int *y);
 
 extern int WinWidth, WinHeight;

Modified: trunk/teraterm/teraterm/vtterm.c
===================================================================
--- trunk/teraterm/teraterm/vtterm.c	2010-12-21 13:38:14 UTC (rev 4249)
+++ trunk/teraterm/teraterm/vtterm.c	2010-12-22 06:27:26 UTC (rev 4250)
@@ -2053,8 +2053,9 @@
 	break;
       case 14: /* get window size??? */
 	if (ts.WindowFlag & WF_WINDOWREPORT) {
-	  /* this is not actual window size */
-	  SendCSIstr("4;640;480t", 0);
+	  DispGetWindowSize(&x, &y);
+	  len = _snprintf_s_l(Report, sizeof(Report), _TRUNCATE, "4;%d;%dt", CLocale, y, x);
+	  SendCSIstr(Report, len);
 	}
 	break;
       case 18: /* get terminal size */



Ttssh2-commit メーリングリストの案内
Back to archive index