]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/listbox.cpp
use current mouse position as default position in wxWindow::PopupMenu (works better...
[wxWidgets.git] / src / mac / carbon / listbox.cpp
index f84803aecad9bd5615f745ab7064df8a867408b2..50e9f4445f58a2db943b4b52e8be048b14a65138 100644 (file)
@@ -27,7 +27,7 @@
 IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
 
 BEGIN_EVENT_TABLE(wxListBox, wxControl)
-#if !TARGET_API_MAC_OSX
+#if !__WXMAC_OSX__
     EVT_SIZE( wxListBox::OnSize )
     EVT_CHAR( wxListBox::OnChar )
 #endif
@@ -106,7 +106,9 @@ static pascal  void DataBrowserItemNotificationProc(ControlRef browser, DataBrow
                     event.SetString( list->GetString(i) );
                     event.SetInt(i) ;
                     event.SetExtraLong( list->HasMultipleSelection() ? message == kDataBrowserItemSelected : TRUE );
-                    list->GetEventHandler()->ProcessEvent(event) ;
+                    wxPostEvent( list->GetEventHandler() , event ) ;
+                    // direct notification is not always having the listbox GetSelection() having in synch with event
+                    // list->GetEventHandler()->ProcessEvent(event) ; 
                 } 
                 break ;
             }