[Ttssh2-commit] [7392] Merge branch 'trunk' r7390 into cmake

scmno****@osdn***** scmno****@osdn*****
2019年 1月 13日 (日) 18:35:33 JST


Revision: 7392
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7392
Author:   zmatsuo
Date:     2019-01-13 18:35:33 +0900 (Sun, 13 Jan 2019)
Log Message:
-----------
Merge branch 'trunk' r7390 into cmake

Revision Links:
--------------
    http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7390

Modified Paths:
--------------
    branches/cmake/teraterm/common/ttlib.c
    branches/cmake/teraterm/common/ttlib.h
    branches/cmake/teraterm/common/tttypes.h
    branches/cmake/teraterm/teraterm/addsetting.cpp
    branches/cmake/teraterm/teraterm/vtdisp.c
    branches/cmake/teraterm/teraterm/vtwin.cpp
    branches/cmake/teraterm/teraterm/vtwin.h
    branches/cmake/teraterm/ttpset/ttset.c

-------------- next part --------------
Modified: branches/cmake/teraterm/common/ttlib.c
===================================================================
--- branches/cmake/teraterm/common/ttlib.c	2019-01-13 09:35:20 UTC (rev 7391)
+++ branches/cmake/teraterm/common/ttlib.c	2019-01-13 09:35:33 UTC (rev 7392)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2006-2017 TeraTerm Project
+ * (C) 2006-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Modified: branches/cmake/teraterm/common/ttlib.h
===================================================================
--- branches/cmake/teraterm/common/ttlib.h	2019-01-13 09:35:20 UTC (rev 7391)
+++ branches/cmake/teraterm/common/ttlib.h	2019-01-13 09:35:33 UTC (rev 7392)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1994-1998 T. Teranishi
+ * Copyright (C) 1994-1999 T. Teranishi
  * (C) 2006-2018 TeraTerm Project
  * All rights reserved.
  *

Modified: branches/cmake/teraterm/common/tttypes.h
===================================================================
--- branches/cmake/teraterm/common/tttypes.h	2019-01-13 09:35:20 UTC (rev 7391)
+++ branches/cmake/teraterm/common/tttypes.h	2019-01-13 09:35:33 UTC (rev 7392)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2004-2018 TeraTerm Project
+ * (C) 2004-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -550,8 +550,8 @@
 	/* protocol used in connect() */
 	int ProtocolFamily;
 	char MouseCursorName[16];
-	int AlphaBlendActive;
-	int AlphaBlendInactive;
+	BYTE AlphaBlendActive;
+	BYTE AlphaBlendInactive;
 	char CygwinDirectory[MAX_PATH];
 #define DEFAULT_LOCALE "japanese"
 	char Locale[80];

Modified: branches/cmake/teraterm/teraterm/addsetting.cpp
===================================================================
--- branches/cmake/teraterm/teraterm/addsetting.cpp	2019-01-13 09:35:20 UTC (rev 7391)
+++ branches/cmake/teraterm/teraterm/addsetting.cpp	2019-01-13 09:35:33 UTC (rev 7392)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2018 TeraTerm Project
+ * Copyright (C) 2008-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -655,9 +655,9 @@
 	SendDlgItemMessage(IDC_FONT_QUALITY, CB_ADDSTRING, 0, (LPARAM)uimsg);
 
 	// (1)AlphaBlend
-	_snprintf_s(buf, sizeof(buf), _TRUNCATE, "%d", ts.AlphaBlendActive);
+
 	SetDlgItemNum(IDC_ALPHA_BLEND_ACTIVE, ts.AlphaBlendActive);
-	_snprintf_s(buf, sizeof(buf), _TRUNCATE, "%d", ts.AlphaBlendInactive);
+
 	SetDlgItemNum(IDC_ALPHA_BLEND_INACTIVE, ts.AlphaBlendInactive);
 
 	// (2)[BG] BGEnable

Modified: branches/cmake/teraterm/teraterm/vtdisp.c
===================================================================
--- branches/cmake/teraterm/teraterm/vtdisp.c	2019-01-13 09:35:20 UTC (rev 7391)
+++ branches/cmake/teraterm/teraterm/vtdisp.c	2019-01-13 09:35:33 UTC (rev 7392)
@@ -3701,27 +3701,41 @@
   }
 }
 
-void DispShowWindow(int mode) {
+void DispShowWindow(int mode)
+{
 	switch (mode) {
-	  case WINDOW_MINIMIZE:
+	case WINDOW_MINIMIZE:
 		ShowWindow(HVTWin, SW_MINIMIZE);
 		break;
-	  case WINDOW_MAXIMIZE:
+	case WINDOW_MAXIMIZE:
 		ShowWindow(HVTWin, SW_MAXIMIZE);
 		break;
-	  case WINDOW_RESTORE:
+	case WINDOW_RESTORE:
 		ShowWindow(HVTWin, SW_RESTORE);
 		break;
-	  case WINDOW_RAISE:
-		SetWindowPos(HVTWin, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
+	case WINDOW_RAISE: {
+		//\x89\xBD\x82\xE0\x8BN\x82\xAB\x82Ȃ\xA2\x82\xB1\x82Ƃ\xA0\x82\xE8
+		//  SetWindowPos(HVTWin, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
+//#define RAISE_AND_GET_FORCUS
+#if defined(RAISE_AND_GET_FORCUS)
+		//\x83t\x83H\x81[\x83J\x83X\x82\xF0\x92D\x82\xA4
+		SetForegroundWindow(HVTWin);
+#else
+		//\x83t\x83H\x81[\x83J\x83X\x82͒D\x82킸\x8Dŏ\xE3\x96ʂɗ\x88\x82\xE9
+		BringWindowToTop(HVTWin);
+		if (GetForegroundWindow() != HVTWin) {
+			FlashWindow(HVTWin, TRUE);
+		}
+#endif
+	}
 		break;
-	  case WINDOW_LOWER:
+	case WINDOW_LOWER:
 		SetWindowPos(HVTWin, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
 		break;
-	  case WINDOW_REFRESH:
+	case WINDOW_REFRESH:
 		InvalidateRect(HVTWin, NULL, FALSE);
 		break;
-	  case WINDOW_TOGGLE_MAXIMIZE:
+	case WINDOW_TOGGLE_MAXIMIZE:
 		if (IsZoomed(HVTWin)) {
 			ShowWindow(HVTWin, SW_RESTORE);
 		}

Modified: branches/cmake/teraterm/teraterm/vtwin.cpp
===================================================================
--- branches/cmake/teraterm/teraterm/vtwin.cpp	2019-01-13 09:35:20 UTC (rev 7391)
+++ branches/cmake/teraterm/teraterm/vtwin.cpp	2019-01-13 09:35:33 UTC (rev 7392)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2004-2018 TeraTerm Project
+ * (C) 2004-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -2449,6 +2449,24 @@
 
 	int line, i;
 
+	if (pSetLayeredWindowAttributes != NULL) {
+		BOOL InTitleBar;
+		POINT point = pt;
+		GetPositionOnWindow(HVTWin, &point,
+							NULL, NULL, &InTitleBar);
+		if (InTitleBar) {
+			int delta = zDelta < 0 ? -1 : 1;
+			int newAlpha = Alpha;
+			newAlpha += delta * ts.MouseWheelScrollLine;
+			if (newAlpha > 255)
+				newAlpha = 255;
+			else if (newAlpha < 0)
+				newAlpha = 0;
+			SetWindowAlpha(newAlpha);
+			return TRUE;
+		}
+	}
+
 	::ScreenToClient(HVTWin, &pt);
 
 	line = abs(zDelta) / WHEEL_DELTA; // \x83\x89\x83C\x83\x93\x90\x94

Modified: branches/cmake/teraterm/teraterm/vtwin.h
===================================================================
--- branches/cmake/teraterm/teraterm/vtwin.h	2019-01-13 09:35:20 UTC (rev 7391)
+++ branches/cmake/teraterm/teraterm/vtwin.h	2019-01-13 09:35:33 UTC (rev 7392)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2004-2018 TeraTerm Project
+ * (C) 2004-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Modified: branches/cmake/teraterm/ttpset/ttset.c
===================================================================
--- branches/cmake/teraterm/ttpset/ttset.c	2019-01-13 09:35:20 UTC (rev 7391)
+++ branches/cmake/teraterm/ttpset/ttset.c	2019-01-13 09:35:33 UTC (rev 7392)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2004-2018 TeraTerm Project
+ * (C) 2004-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without


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