- //
- // Generate our own double-clicks
- // (to allow on-focus dc-event on double-clicks instead of triple-clicks)
- if ( (m_windowStyle & wxCC_SPECIAL_DCLICK) &&
- !m_isPopupShown &&
- //!(handlerFlags & wxCC_MF_ON_BUTTON) )
- !(flags & wxCC_MF_ON_BUTTON) )
- {
- if ( evtType == wxEVT_LEFT_DOWN )
- {
- // Set value to avoid up-events without corresponding downs
- m_downReceived = true;
- }
- else if ( evtType == wxEVT_LEFT_DCLICK )
- {
- // We'll make our own double-clicks
- //evtType = 0;
- event.SetEventType(0);
- return true;
- }
- else if ( evtType == wxEVT_LEFT_UP )
- {
- if ( m_downReceived || m_timeLastMouseUp == 1 )
- {
- wxLongLong timeFromLastUp = (t-m_timeLastMouseUp);
-
- if ( timeFromLastUp < DOUBLE_CLICK_CONVERSION_TRESHOLD )
- {
- //type = wxEVT_LEFT_DCLICK;
- event.SetEventType(wxEVT_LEFT_DCLICK);
- m_timeLastMouseUp = 1;
- }
- else
- {
- m_timeLastMouseUp = t;
- }
-
- //m_downReceived = false;
- }
- }
- }
-