[Ttssh2-commit] [3297] ウィンドウ位置変更シーケンス ( dtterm由来 ?) に対応。

svnno****@sourc***** svnno****@sourc*****
2009年 4月 9日 (木) 00:11:32 JST


Revision: 3297
          http://svn.sourceforge.jp/view?root=ttssh2&view=rev&rev=3297
Author:   doda
Date:     2009-04-09 00:11:32 +0900 (Thu, 09 Apr 2009)

Log Message:
-----------
ウィンドウ位置変更シーケンス(dtterm由来?)に対応。
  <CSI> 3 ; X ; Y t
     X,Y: ウィンドウの位置

% ruby -e 'STDOUT.sync=true; 10.times do print "\e[3;#{rand 200};#{rand 200}t"; sleep 1; end'

Modified Paths:
--------------
    trunk/teraterm/teraterm/vtdisp.c
    trunk/teraterm/teraterm/vtdisp.h
    trunk/teraterm/teraterm/vtterm.c


-------------- next part --------------
Modified: trunk/teraterm/teraterm/vtdisp.c
===================================================================
--- trunk/teraterm/teraterm/vtdisp.c	2009-04-08 14:00:33 UTC (rev 3296)
+++ trunk/teraterm/teraterm/vtdisp.c	2009-04-08 15:11:32 UTC (rev 3297)
@@ -3277,6 +3277,12 @@
 #endif
 }
 
+void DispMoveWindow(int x, int y) {
+	SetWindowPos(HVTWin, 0, x, y, 0, 0, SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE);
+	DispSetWinPos();
+	return;
+}
+
 void DispSetActive(BOOL ActiveFlag)
 {
   Active = ActiveFlag;

Modified: trunk/teraterm/teraterm/vtdisp.h
===================================================================
--- trunk/teraterm/teraterm/vtdisp.h	2009-04-08 14:00:33 UTC (rev 3296)
+++ trunk/teraterm/teraterm/vtdisp.h	2009-04-08 15:11:32 UTC (rev 3297)
@@ -79,6 +79,7 @@
 void DispSetANSIColor(int num, COLORREF color);
 COLORREF DispGetANSIColor(int num);
 void DispSetCurCharAttr(TCharAttr Attr);
+void DispMoveWindow(int x, int y);
 
 extern int WinWidth, WinHeight;
 extern HFONT VTFont[AttrFontMask+1];

Modified: trunk/teraterm/teraterm/vtterm.c
===================================================================
--- trunk/teraterm/teraterm/vtterm.c	2009-04-08 14:00:33 UTC (rev 3296)
+++ trunk/teraterm/teraterm/vtterm.c	2009-04-08 15:11:32 UTC (rev 3297)
@@ -1750,6 +1750,11 @@
     char Report[16];
 
     switch (Param[1]) {
+      case 3:
+	if (NParam < 2) Param[2] = 0;
+	if (NParam < 3) Param[3] = 0;
+	DispMoveWindow(Param[2], Param[3]);
+	break;
       case 8: /* set terminal size */
 	if ((Param[2]<=1) || (NParam<2)) Param[2] = 24;
 	if ((Param[3]<=1) || (NParam<3)) Param[3] = 80;



Ttssh2-commit メーリングリストの案内