Implement EVT_MOUSE_CAPTURE_LOST handling for wxPopupTransientWindow.
Handle mouse capture lost events instead of polling for the mouse status in EVT_IDLE handler. This is not only more efficient but also catches the cases when the capture was lost before OnIdle() could be executed which could result in assertion failures and, before the previous commit, even crashes. The idle-time code is still used for wxOSX/Carbon because it doesn't seem to generate mouse capture loss events currently -- but should be removed as soon as support for these events is added. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -132,7 +132,9 @@ protected:
|
||||
// get alerted when child gets deleted from under us
|
||||
void OnDestroy(wxWindowDestroyEvent& event);
|
||||
|
||||
#if defined( __WXMSW__ ) || defined( __WXMAC__)
|
||||
// wxOSX/Carbon doesn't generate mouse capture loss events currently so
|
||||
// poll for the capture loss ourselves.
|
||||
#if wxOSX_USE_CARBON
|
||||
// check if the mouse needs captured or released
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user