]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/listctrl_mac.cpp
wxRichTextCtrl native caret now flashes, for wxMac/Core Graphics mode
[wxWidgets.git] / src / osx / carbon / listctrl_mac.cpp
index 40b6d3619821be7d86d46ff5749a8b8195333255..668d141a0af0adcc90ee33c634a6f8e8c1773261 100644 (file)
@@ -300,6 +300,9 @@ wxMacListCtrlEventDelegate::wxMacListCtrlEventDelegate( wxListCtrl* list, int id
 
 bool wxMacListCtrlEventDelegate::ProcessEvent( wxEvent& event )
 {
+    int id = event.GetId();
+    wxObject* obj = event.GetEventObject();
+    
     // even though we use a generic list ctrl underneath, make sure
     // we present ourselves as wxListCtrl.
     event.SetEventObject( m_list );
@@ -307,10 +310,20 @@ bool wxMacListCtrlEventDelegate::ProcessEvent( wxEvent& event )
 
     if ( !event.IsKindOf( CLASSINFO( wxCommandEvent ) ) )
     {
-        if (m_list->HandleWindowEvent( event ))
+        if (m_list->GetEventHandler()->ProcessEvent( event ))
+        {
+            event.SetId(id);
+            event.SetEventObject(obj);
             return true;
+        }
     }
-    return wxEvtHandler::ProcessEvent(event);
+    // Also try with the original id
+    bool success = wxEvtHandler::ProcessEvent(event);
+    event.SetId(id);
+    event.SetEventObject(obj);
+    if (!success && id != m_id)
+        success = wxEvtHandler::ProcessEvent(event);
+    return success;
 }
 
 //-----------------------------------------------------------------------------