[Ttssh2-commit] [3309] ウィンドウ位置 ( Zオーダ ) 変更制御シーケンス ( dtterm由来 ?) に対応

svnno****@sourc***** svnno****@sourc*****
2009年 4月 13日 (月) 20:51:36 JST


Revision: 3309
          http://svn.sourceforge.jp/view?root=ttssh2&view=rev&rev=3309
Author:   doda
Date:     2009-04-13 20:51:36 +0900 (Mon, 13 Apr 2009)

Log Message:
-----------
ウィンドウ位置(Zオーダ)変更制御シーケンス(dtterm由来?)に対応
  <CSI> Ps t
    Ps=5	前面に移動
       6	背面に移動

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-13 10:26:02 UTC (rev 3308)
+++ trunk/teraterm/teraterm/vtdisp.c	2009-04-13 11:51:36 UTC (rev 3309)
@@ -3357,5 +3357,21 @@
 }
 
 void DispShowWindow(int mode) {
-	ShowWindow(HVTWin, mode);
+	switch (mode) {
+	  case WINDOW_MINIMIZE:
+		ShowWindow(HVTWin, SW_MINIMIZE);
+		break;
+	  case WINDOW_MAXIMIZE:
+		ShowWindow(HVTWin, SW_MAXIMIZE);
+		break;
+	  case WINDOW_RESTORE:
+		ShowWindow(HVTWin, SW_RESTORE);
+		break;
+	  case WINDOW_RAISE:
+		SetWindowPos(HVTWin, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
+		break;
+	  case WINDOW_LOWER:
+		SetWindowPos(HVTWin, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
+		break;
+	}
 }

Modified: trunk/teraterm/teraterm/vtdisp.h
===================================================================
--- trunk/teraterm/teraterm/vtdisp.h	2009-04-13 10:26:02 UTC (rev 3308)
+++ trunk/teraterm/teraterm/vtdisp.h	2009-04-13 11:51:36 UTC (rev 3309)
@@ -100,6 +100,12 @@
 #define SCROLL_POS	6
 #define SCROLL_TOP	7
 
+#define WINDOW_MINIMIZE 1
+#define WINDOW_MAXIMIZE 2
+#define WINDOW_RESTORE  3
+#define WINDOW_RAISE    4
+#define WINDOW_LOWER    5
+
 #ifdef __cplusplus
 }
 #endif

Modified: trunk/teraterm/teraterm/vtterm.c
===================================================================
--- trunk/teraterm/teraterm/vtterm.c	2009-04-13 10:26:02 UTC (rev 3308)
+++ trunk/teraterm/teraterm/vtterm.c	2009-04-13 11:51:36 UTC (rev 3309)
@@ -1751,16 +1751,22 @@
 
     switch (Param[1]) {
       case 1: // De-iconify window
-	DispShowWindow(SW_RESTORE);
+	DispShowWindow(WINDOW_RESTORE);
 	break;
       case 2: // Iconify window
-	DispShowWindow(SW_MINIMIZE);
+	DispShowWindow(WINDOW_MINIMIZE);
 	break;
       case 3: // set window position
 	if (NParam < 2) Param[2] = 0;
 	if (NParam < 3) Param[3] = 0;
 	DispMoveWindow(Param[2], Param[3]);
 	break;
+      case 5:
+	DispShowWindow(WINDOW_RAISE);
+	break;
+      case 6:
+	DispShowWindow(WINDOW_LOWER);
+	break;
       case 8: /* set terminal size */
 	if ((Param[2]<=1) || (NParam<2)) Param[2] = 24;
 	if ((Param[3]<=1) || (NParam<3)) Param[3] = 80;
@@ -1768,10 +1774,10 @@
 	break;
       case 9: // Maximize/Restore window
 	if (NParam < 2 || Param[2] == 0) {
-	  DispShowWindow(SW_RESTORE);
+	  DispShowWindow(WINDOW_RESTORE);
 	}
 	else {
-	  DispShowWindow(SW_MAXIMIZE);
+	  DispShowWindow(WINDOW_MAXIMIZE);
 	}
 	break;
       case 14: /* get window size??? */



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