Make wxSetInputFocusToXWindow a member instead of free function

Also add a couple of workarounds for problems when using Xvfb.

See https://github.com/wxWidgets/wxWidgets/pull/1845
This commit is contained in:
ali kettab
2020-05-15 22:25:40 +01:00
committed by Vadim Zeitlin
parent 609f77ff55
commit a3e264e8a3
3 changed files with 63 additions and 20 deletions

View File

@@ -211,6 +211,16 @@ void NumValidatorTestCase::Interactive()
return;
#endif // __WXMSW__
#ifdef __WXGTK20__
// Travis CI fails without this!
if ( IsAutomaticTest() )
{
wxFrame* frame = wxDynamicCast(wxTheApp->GetTopWindow(), wxFrame);
frame->SetFocus();
frame->Raise();
}
#endif // __WXGTK20__
// Set a locale using comma as thousands separator character.
wxLocale loc(wxLANGUAGE_ENGLISH_UK, wxLOCALE_DONT_LOAD_DEFAULT);