[Ttssh2-commit] [7322] 特定のWindowsのバージョンでクラッシュする対策

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2018年 12月 11日 (火) 22:11:27 JST


Revision: 7322
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7322
Author:   zmatsuo
Date:     2018-12-11 22:11:26 +0900 (Tue, 11 Dec 2018)
Log Message:
-----------
特定のWindowsのバージョンでクラッシュする対策
- Windows 10 1809/18252.1000 などで発生
- SetLayeredWindowAttributes()で半透明設定していると
  SetMenu()呼び出しで、ウィンドウが表示されていない状態でもWM_PAINTが発生する
- チケット #38785 https://ja.osdn.net/projects/ttssh2/ticket/38785

Ticket Links:
------------
    http://sourceforge.jp/projects/ttssh2/tracker/detail/38785

Modified Paths:
--------------
    trunk/teraterm/teraterm/vtwin.cpp

-------------- next part --------------
Modified: trunk/teraterm/teraterm/vtwin.cpp
===================================================================
--- trunk/teraterm/teraterm/vtwin.cpp	2018-12-10 15:02:10 UTC (rev 7321)
+++ trunk/teraterm/teraterm/vtwin.cpp	2018-12-11 13:11:26 UTC (rev 7322)
@@ -838,7 +838,6 @@
 	SerialNo = RegWin(HVTWin,NULL);
 
 	logfile_lock_initialize();
-	SetWindowStyle(&ts);
 	// \x83\x8D\x83P\x81[\x83\x8B\x82̐ݒ\xE8
 	// wctomb \x82̂\xBD\x82\xDF
 	setlocale(LC_ALL, ts.Locale);
@@ -914,6 +913,7 @@
 	if (ts.Minimize>0) {
 		CmdShow = SW_SHOWMINIMIZED;
 	}
+	SetWindowStyle(&ts);
 	ShowWindow(CmdShow);
 	ChangeCaret();
 
@@ -2238,7 +2238,7 @@
 				DefaultShowDialog = !DoNotShowDialog;
 			}
 		}
-			 
+
 		switch (DropType) {
 		case DROP_TYPE_CANCEL:
 		default:
@@ -2635,6 +2635,11 @@
 	HDC PaintDC;
 	int Xs, Ys, Xe, Ye;
 
+	// \x95\\x8E\xA6\x82\xB3\x82\xEA\x82Ă\xA2\x82Ȃ\xAD\x82Ă\xE0WM_PAINT\x82\xAA\x94\xAD\x90\xB6\x82\xB7\x82\xE9\x83P\x81[\x83X\x91΍\xF4
+	if (IsWindowVisible() == 0) {
+		return;
+	}
+
 #ifdef ALPHABLEND_TYPE2
 //<!--by AKASI
 	BGSetupPrimary(FALSE);


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