Open maynardGK opened 6 years ago
I had forgotten about this, except I just had to re-discover the bug. @slayoo @GillesDuvert @acoulais For proper operation, win32 needs to have already called GDLWidget::Init() before the eventhandler check. To quickly see the effect one can run the artifact build on a windows machine and ".run testfocus". So that call would be good in graphicsdevice.cpp, with an entry in gdlwidget.cpp for the routine. This will, however, break for OSX/clang tests in travis.
@maynardGK , GDLWidget::Init() is not used, actually. Only defined in widgets.hpp. And the wxWidgets library has been wxInitialize() almost at start of gdl, so is activated before the handler loop. Would you submit a patch?
I've included a call to GDLWidget::Init(), under condition #if defined( _WIN32), in #520 . This will work for win32 and others but it will probably not work for OSX travis test unless it is built without WX. - verified https://travis-ci.org/gnudatalanguage/gdl/builds/461104106?utm_source=github_status&utm_medium=notification
So instead a test for os is made and if !version.os == "darwin" then there is no wx initialization.
@GillesDuvert https://github.com/gnudatalanguage/gdl/pull/520
see #882
I've been getting consistent failures each from test_bug_2974380 which simply creates a window. The tests, each from a clang-built OSX GDL, fail when the proper initialization is actually performed for wxWidgets. wxInitialization() is only called when invoked from graphicsdevice::Init() when GDL_USE_WX="YES". It needs to be called, of course, in all circumstances when widgets are to be used and so when this bug is repaired, testing exposes that the clang/OSX builds do not take wxWidgets.
262