[Ttssh2-commit] [8362] EnableWindow(),SetFocus()の使用をやめた

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 11月 6日 (水) 22:27:30 JST


Revision: 8362
          https://osdn.net/projects/ttssh2/scm/svn/commits/8362
Author:   zmatsuo
Date:     2019-11-06 22:27:30 +0900 (Wed, 06 Nov 2019)
Log Message:
-----------
EnableWindow(),SetFocus()の使用をやめた

- 送信中は SendMemInit() がエラーを返すようにした

Modified Paths:
--------------
    branches/unicode_buf/teraterm/teraterm/sendmem.cpp

-------------- next part --------------
Modified: branches/unicode_buf/teraterm/teraterm/sendmem.cpp
===================================================================
--- branches/unicode_buf/teraterm/teraterm/sendmem.cpp	2019-11-06 13:27:19 UTC (rev 8361)
+++ branches/unicode_buf/teraterm/teraterm/sendmem.cpp	2019-11-06 13:27:30 UTC (rev 8362)
@@ -37,6 +37,9 @@
 
 #include "sendmem.h"
 
+// \x91\x97\x90M\x92\x86\x82\xC9VTWIN\x82ɔr\x91\xBC\x82\xF0\x82\xA9\x82\xAF\x82\xE9
+#define	USE_ENABLE_WINDOW	0	// 1=\x94r\x91\xBC\x82\xB7\x82\xE9
+
 typedef struct SendMemTag {
 	const BYTE *send_ptr;  // \x91\x97\x90M\x83f\x81[\x83^\x82ւ̃|\x83C\x83\x93\x83^
 	size_t send_len;	   // \x91\x97\x90M\x83f\x81[\x83^\x83T\x83C\x83Y
@@ -116,8 +119,10 @@
 	sendmem_work = NULL;
 
 	// \x91\x80\x8D\xEC\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB7\x82\xE9
+#if USE_ENABLE_WINDOW
 	EnableWindow(HVTWin, TRUE);
 	SetFocus(HVTWin);
+#endif
 }
 
 static void OnClose()
@@ -162,7 +167,9 @@
 	TalkStatus = IdTalkSendMem;
 
 	// \x91\x97\x90M\x8AJ\x8En\x8E\x9E\x82ɃE\x83B\x83\x93\x83h\x83E\x82𑀍\xEC\x82ł\xAB\x82Ȃ\xA2\x82悤\x82ɂ\xB7\x82\xE9
+#if USE_ENABLE_WINDOW
 	EnableWindow(HVTWin, FALSE);
+#endif
 }
 
 static void GetOutBuffInfo(const TComVar *cv_, size_t *use, size_t *free)
@@ -397,6 +404,10 @@
  */
 SendMem *SendMemInit(void *ptr, size_t len, SendMemType type)
 {
+	if (sendmem_work != NULL) {
+		// \x91\x97\x90M\x92\x86
+		return NULL;
+	}
 	SendMem *p = (SendMem *)calloc(sizeof(*p), 1);
 	if (p == NULL) {
 		return NULL;


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