Fix "Enter" behaviour when wxEVT_TEXT_ENTER is skipped in wxGTK

Bring wxGTK in sync with wxMSW and wxMac by activating the default
button manually if wxEVT_TEXT_ENTER handler skips the event.
This commit is contained in:
Vadim Zeitlin
2019-07-14 01:56:54 +02:00
parent ef03d3bb93
commit f7ead9f844
4 changed files with 47 additions and 0 deletions

View File

@@ -1693,6 +1693,12 @@ void wxTextCtrl::OnChar( wxKeyEvent &key_event )
event.SetString(GetValue());
if ( HandleWindowEvent(event) )
return;
// We disable built-in default button activation when
// wxTE_PROCESS_ENTER is used, but we still should activate it
// if the event wasn't handled, so do it from here.
if ( ClickDefaultButtonIfPossible() )
return;
}
}