scmno****@osdn*****
scmno****@osdn*****
2018年 3月 8日 (木) 13:13:12 JST
Revision: 7078 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7078 Author: doda Date: 2018-03-08 13:13:12 +0900 (Thu, 08 Mar 2018) Log Message: ----------- Mouse Tracking で、クリック後にメニュー等が使えないのを修正 #38011 ボタンアップ時に ReleaseCapture() が行われず、SetCapture() された ままになっていた為。 Mouse Tracking ではボタンダウン時に LButton / MButton / RButton を セットしない為、後続の ButtonUp() が呼ばれず、その中で行われる ReleaseCapture() も実行されていなかった。 Ticket Links: ------------ http://sourceforge.jp/projects/ttssh2/tracker/detail/38011 Modified Paths: -------------- trunk/teraterm/teraterm/vtwin.cpp -------------- next part -------------- Modified: trunk/teraterm/teraterm/vtwin.cpp =================================================================== --- trunk/teraterm/teraterm/vtwin.cpp 2018-03-06 03:25:06 UTC (rev 7077) +++ trunk/teraterm/teraterm/vtwin.cpp 2018-03-08 04:13:12 UTC (rev 7078) @@ -2368,8 +2368,9 @@ { if (IgnoreRelease) IgnoreRelease = FALSE; - else - MouseReport(IdMouseEventBtnUp, IdLeftButton, point.x, point.y); + else if (MouseReport(IdMouseEventBtnUp, IdLeftButton, point.x, point.y)) { + ReleaseCapture(); + } if (! LButton) { return; @@ -2389,12 +2390,11 @@ void CVTWindow::OnMButtonUp(UINT nFlags, CPoint point) { - BOOL mousereport; - if (IgnoreRelease) IgnoreRelease = FALSE; - else - mousereport = MouseReport(IdMouseEventBtnUp, IdMiddleButton, point.x, point.y); + else if (MouseReport(IdMouseEventBtnUp, IdMiddleButton, point.x, point.y)) { + ReleaseCapture(); + } if (! MButton) { return; @@ -2401,7 +2401,7 @@ } // added DisablePasteMouseMButton (2008.3.2 maya) - if ((ts.PasteFlag & CPF_DISABLE_MBUTTON) || mousereport) { + if (ts.PasteFlag & CPF_DISABLE_MBUTTON) { ButtonUp(FALSE); } else { @@ -2574,12 +2574,11 @@ void CVTWindow::OnRButtonUp(UINT nFlags, CPoint point) { - BOOL mousereport; - if (IgnoreRelease) IgnoreRelease = FALSE; - else - mousereport = MouseReport(IdMouseEventBtnUp, IdRightButton, point.x, point.y); + else if (MouseReport(IdMouseEventBtnUp, IdRightButton, point.x, point.y)) { + ReleaseCapture(); + } if (! RButton) { return; @@ -2590,9 +2589,8 @@ * \x81Ets.PasteFlag & CPF_DISABLE_RBUTTON -> \x89E\x83{\x83^\x83\x93\x82ɂ\xE6\x82\xE9\x83y\x81[\x83X\x83g\x96\xB3\x8C\xF8 * \x81Ets.PasteFlag & CPF_CONFIRM_RBUTTON -> \x95\\x8E\xA6\x82\xB3\x82ꂽ\x83\x81\x83j\x83\x85\x81[\x82\xA9\x82\xE7\x83y\x81[\x83X\x83g\x82\xF0\x8Ds\x82\xA4\x82̂ŁA * \x89E\x83{\x83^\x83\x93\x83A\x83b\x83v\x82ɂ\xE6\x82\xE9\x83y\x81[\x83X\x83g\x82͍s\x82\xED\x82Ȃ\xA2 - * \x81Emousereport -> \x83}\x83E\x83X\x83g\x83\x89\x83b\x83L\x83\x93\x83O\x92\x86\x82̓y\x81[\x83X\x83g\x82\xF0\x8Ds\x82\xED\x82Ȃ\xA2 */ - if ((ts.PasteFlag & CPF_DISABLE_RBUTTON) || (ts.PasteFlag & CPF_CONFIRM_RBUTTON) || mousereport) { + if ((ts.PasteFlag & CPF_DISABLE_RBUTTON) || (ts.PasteFlag & CPF_CONFIRM_RBUTTON)) { ButtonUp(FALSE); } else { ButtonUp(TRUE);