Generate wxEVT_KILL_FOCUS for wxSearchCtrl under Mac

Do it using controlTextDidChange: notification as it's already done for
wxTextCtrl and wxComboBox.

See #22702.

Closes #22706.

(cherry picked from commit 0bb0fe24d137ad7768055cddd4686ed22aba17e2)
This commit is contained in:
Vadim Zeitlin 2022-08-05 01:08:15 +02:00
parent 475f66e246
commit f953bf762f

View File

@ -75,6 +75,14 @@
impl->controlTextDidChange();
}
- (void)controlTextDidEndEditing:(NSNotification *) aNotification
{
wxUnusedVar(aNotification);
wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
if ( impl )
impl->DoNotifyFocusLost();
}
- (NSArray *)control:(NSControl *)control textView:(NSTextView *)textView completions:(NSArray *)words
forPartialWordRange:(NSRange)charRange indexOfSelectedItem:(int*)index
{