• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision7240 (tree)
Time2018-09-13 23:58:51
Authorzmatsuo

Log Message

metaキーの扱いを正しくした
システムメニュのメニューバー表示を動作するようにした

Change Summary

Incremental Difference

--- branches/cmake/teraterm/teraterm/vtwin.cpp (revision 7239)
+++ branches/cmake/teraterm/teraterm/vtwin.cpp (revision 7240)
@@ -30,7 +30,6 @@
3030
3131 /* TERATERM.EXE, VT window */
3232
33-//#include "stdafx.h"
3433 #include <winsock2.h>
3534 #include <ws2tcpip.h>
3635 #include "teraterm.h"
@@ -677,7 +676,6 @@
677676 #ifdef ALPHABLEND_TYPE2
678677 DWORD ExStyle;
679678 #endif
680- char *Param;
681679 int CmdShow;
682680 #ifdef SHARED_KEYMAP
683681 char Temp[MAX_PATH];
@@ -761,8 +759,8 @@
761759 /* Parse command line parameters*/
762760 // 256バイト以上のコマンドラインパラメータ指定があると、BOF(Buffer Over Flow)で
763761 // 落ちるバグを修正。(2007.6.12 maya)
764- Param = GetCommandLine();
765762 if (LoadTTSET()) {
763+ LPTSTR Param = GetCommandLine();
766764 (*ParseParam)(Param, &ts, &(TopicName[0]));
767765 }
768766 FreeTTSET();
@@ -6241,7 +6239,7 @@
62416239 break;
62426240 #endif
62436241 case WM_SYSCOMMAND:
6244- OnSysCommand((wp & 0xFFF0), lp);
6242+ OnSysCommand(wp, lp);
62456243 TTCFrameWnd::Proc(msg, wp, lp);
62466244 break;
62476245 case WM_SYSKEYDOWN:
--- branches/cmake/teraterm/teraterm/teraterm.cpp (revision 7239)
+++ branches/cmake/teraterm/teraterm/teraterm.cpp (revision 7240)
@@ -219,14 +219,19 @@
219219
220220 MSG msg;
221221 while (GetMessage(&msg, NULL, 0, 0)) {
222+ bool message_processed = false;
222223
223- if (MetaKey(ts.MetaKey)) {
224- continue;
224+ if (m_pMainWnd->m_hAccel != NULL) {
225+ if (!MetaKey(ts.MetaKey)) {
226+ // matakeyが押されていない
227+ if (TranslateAccelerator(m_pMainWnd->m_hWnd , m_pMainWnd->m_hAccel, &msg)) {
228+ // アクセラレーターキーを処理した
229+ message_processed = true;
230+ }
231+ }
225232 }
226233
227- if (m_pMainWnd->m_hAccel != NULL &&
228- !TranslateAccelerator(m_pMainWnd->m_hWnd , m_pMainWnd->m_hAccel, &msg))
229- {
234+ if (!message_processed) {
230235 TranslateMessage(&msg);
231236 DispatchMessage(&msg);
232237 }
--- branches/cmake/teraterm/teraterm/tekwin.cpp (revision 7239)
+++ branches/cmake/teraterm/teraterm/tekwin.cpp (revision 7240)
@@ -929,7 +929,7 @@
929929 OnSize(wp, LOWORD(lp), HIWORD(lp));
930930 break;
931931 case WM_SYSCOMMAND:
932- OnSysCommand((wp & 0xFFF0), lp);
932+ OnSysCommand(wp, lp);
933933 TTCFrameWnd::Proc(msg, wp, lp);
934934 break;
935935 case WM_SYSKEYDOWN:
Show on old repository browser