don't let WM_RBUTTONDOWN reach def window proc as it would enter a local modal message loop waiting for WM_RBUTTONUO and hose our event generation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
dd932cbe1c
commit
fbd8ac5236
@ -425,6 +425,7 @@ public:
|
||||
|
||||
|
||||
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
virtual WXLRESULT MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
||||
|
||||
|
@ -2275,13 +2275,6 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
|
||||
// newly selected item
|
||||
::SelectItem(GetHwnd(), htItem);
|
||||
::SetFocus(GetHwnd(), htItem);
|
||||
|
||||
// default WM_RBUTTONUP handler enters modal loop inside
|
||||
// DefWindowProc() waiting for WM_RBUTTONDOWN and then sends
|
||||
// the resulting WM_CONTEXTMENU to the parent window, not us,
|
||||
// which completely breaks everything so simply don't let it
|
||||
// see this message at all
|
||||
processed = true;
|
||||
break;
|
||||
|
||||
#if !wxUSE_CHECKBOXES_IN_MULTI_SEL_TREE
|
||||
@ -2541,6 +2534,19 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
|
||||
return rc;
|
||||
}
|
||||
|
||||
WXLRESULT
|
||||
wxTreeCtrl::MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||
{
|
||||
// default WM_RBUTTONDOWN handler enters modal loop inside DefWindowProc()
|
||||
// waiting for WM_RBUTTONUP and then sends the resulting WM_CONTEXTMENU to
|
||||
// the parent window, not us, which completely breaks everything so simply
|
||||
// don't let it see this message at all
|
||||
if ( nMsg == WM_RBUTTONDOWN )
|
||||
return 0;
|
||||
|
||||
return wxControl::MSWDefWindowProc(nMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
// process WM_NOTIFY Windows message
|
||||
bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user