X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a9a4f2295344414e2ee4e3ec27fa5292918dff27..0bcbf72bdc5b128f7387a6f92b2bc7e23d7603db:/src/osx/cocoa/combobox.mm diff --git a/src/osx/cocoa/combobox.mm b/src/osx/cocoa/combobox.mm index 2745d17dec..379027674c 100644 --- a/src/osx/cocoa/combobox.mm +++ b/src/osx/cocoa/combobox.mm @@ -14,6 +14,7 @@ #if wxUSE_COMBOBOX #include "wx/combobox.h" +#include "wx/evtloop.h" #ifndef WX_PRECOMP #include "wx/menu.h" @@ -83,7 +84,14 @@ // For some reason, wxComboBox::GetValue will not return the newly selected item // while we're inside this callback, so use AddPendingEvent to make sure // GetValue() returns the right value. + wxEventLoop* const loop = (wxEventLoop*) wxEventLoopBase::GetActive(); + if ( loop ) + loop->OSXUseLowLevelWakeup(true); + wxpeer->GetEventHandler()->AddPendingEvent( event ); + + if ( loop ) + loop->OSXUseLowLevelWakeup(false); } } } @@ -165,6 +173,18 @@ int wxNSComboBoxControl::FindString(const wxString& text) const return result; } +void wxNSComboBoxControl::Popup() +{ + id ax = NSAccessibilityUnignoredDescendant(m_comboBox); + [ax accessibilitySetValue: [NSNumber numberWithBool: YES] forAttribute: NSAccessibilityExpandedAttribute]; +} + +void wxNSComboBoxControl::Dismiss() +{ + id ax = NSAccessibilityUnignoredDescendant(m_comboBox); + [ax accessibilitySetValue: [NSNumber numberWithBool: NO] forAttribute: NSAccessibilityExpandedAttribute]; +} + wxWidgetImplType* wxWidgetImpl::CreateComboBox( wxComboBox* wxpeer, wxWindowMac* WXUNUSED(parent), wxWindowID WXUNUSED(id),