[ttssh2-commit] [9948] HICON, NotifyIcon を解放するようにした

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2022年 5月 23日 (月) 21:51:04 JST


Revision: 9948
          https://osdn.net/projects/ttssh2/scm/svn/commits/9948
Author:   nmaya
Date:     2022-05-23 21:51:03 +0900 (Mon, 23 May 2022)
Log Message:
-----------
HICON, NotifyIcon を解放するようにした

cf. ttssh2-dev 405

Modified Paths:
--------------
    branches/adjust_icon/teraterm/teraterm/vtwin.cpp
    branches/adjust_icon/teraterm/ttpcmn/ttcmn_notify.cpp

-------------- next part --------------
Modified: branches/adjust_icon/teraterm/teraterm/vtwin.cpp
===================================================================
--- branches/adjust_icon/teraterm/teraterm/vtwin.cpp	2022-05-23 12:39:58 UTC (rev 9947)
+++ branches/adjust_icon/teraterm/teraterm/vtwin.cpp	2022-05-23 12:51:03 UTC (rev 9948)
@@ -1418,6 +1418,9 @@
 
 	SaveVTPos();
 	DestroyWindow();
+
+	TTSetIcon(m_hInst, m_hWnd, NULL, 0);
+	DeleteNotifyIcon(&cv);
 }
 
 // \x91STera Term\x82̏I\x97\xB9\x82\xF0\x8Ew\x8E\xA6\x82\xB7\x82\xE9
@@ -1485,8 +1488,6 @@
 	FreeBuffer();
 
 	TTXEnd(); /* TTPLUG */
-
-	DeleteNotifyIcon(&cv);
 }
 
 static void EscapeFilename(const wchar_t *src, wchar_t *dest)

Modified: branches/adjust_icon/teraterm/ttpcmn/ttcmn_notify.cpp
===================================================================
--- branches/adjust_icon/teraterm/ttpcmn/ttcmn_notify.cpp	2022-05-23 12:39:58 UTC (rev 9947)
+++ branches/adjust_icon/teraterm/ttpcmn/ttcmn_notify.cpp	2022-05-23 12:51:03 UTC (rev 9948)
@@ -105,6 +105,7 @@
 	TT_NOTIFYICONDATAW_V2 *NotifyIcon = &ni->notify_icon;
 	Shell_NotifyIconW(NIM_DELETE, NotifyIcon);
 	ni->NotifyIconShowCount = 0;
+	free(ni);
 }
 
 static void NotifyShowIcon(NotifyIcon *ni)


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