X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/58b1ae5e7297f9a8d410ae2640c0a49ec87368bf..d9307d006e88025e28457290c9997f7c0f7c4fdc:/src/osx/cocoa/nonownedwnd.mm diff --git a/src/osx/cocoa/nonownedwnd.mm b/src/osx/cocoa/nonownedwnd.mm index 7f73ffed91..bbba049d28 100644 --- a/src/osx/cocoa/nonownedwnd.mm +++ b/src/osx/cocoa/nonownedwnd.mm @@ -450,12 +450,19 @@ extern int wxOSXGetIdFromSelector(SEL action ); if ( wxpeer ) { wxpeer->HandleActivated(0, false); + // as for wx the deactivation also means losing focus we + // must trigger this manually + [window makeFirstResponder:nil]; + + // TODO Remove if no problems arise with Popup Windows +#if 0 // Needed for popup window since the firstResponder // (focus in wx) doesn't change when this // TLW becomes inactive. wxFocusEvent event( wxEVT_KILL_FOCUS, wxpeer->GetId()); event.SetEventObject(wxpeer); wxpeer->HandleWindowEvent(event); +#endif } } } @@ -477,6 +484,19 @@ extern int wxOSXGetIdFromSelector(SEL action ); } return editor; } + else if ([anObject isKindOfClass:[wxNSComboBox class]]) + { + wxNSComboBox * cb = (wxNSComboBox*) anObject; + wxNSTextFieldEditor* editor = [cb fieldEditor]; + if ( editor == nil ) + { + editor = [[wxNSTextFieldEditor alloc] init]; + [editor setFieldEditor:YES]; + [cb setFieldEditor:editor]; + [editor release]; + } + return editor; + } return nil; }