Skip to content

Slowly find where OSX/clang test fails. #262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from

Conversation

maynardGK
Copy link
Contributor

This is the baseline build of code for win_plots, where invalid windows plots were
fixed and the keyboard focus was correctly restored for Linux. The Travis builds
xxx.5, and xxx.10 failed via test_bug_2974380 this is for clang compiled on OSX
systems.

This first commit only submits the repaired devicewin.cpp, .hpp files (which are not used in OSX)
If this passes the next step will be to activate the UnsetFocus() call in WShow.

maynardGK added 2 commits May 6, 2018 16:40
  This is the baseline build of code for win_plots, where invalid windows plots were
fixed and the keyboard focus was correctly restored for Linux.  The Travis builds
xxx.5, and xxx.10 failed via test_bug_2974380 this is for clang compiled on OSX
systems.

This first commit only submits the repaired devicewin.cpp, .hpp files (which are not used in OSX)
If this passes the next step will be to activate the UnsetFocus() call in WShow.
@codecov
Copy link

codecov bot commented May 7, 2018

Codecov Report

Merging #262 into master will decrease coverage by <.01%.
The diff coverage is 10%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #262      +/-   ##
==========================================
- Coverage   41.49%   41.49%   -0.01%     
==========================================
  Files         287      287              
  Lines       90961    90963       +2     
==========================================
  Hits        37744    37744              
- Misses      53217    53219       +2
Impacted Files Coverage Δ
src/objects.cpp 95.91% <ø> (+0.15%) ⬆️
src/gdlwidget.cpp 0.23% <0%> (-0.01%) ⬇️
src/widget.cpp 0% <0%> (ø) ⬆️
src/graphicsdevice.cpp 44.85% <16.66%> (+0.13%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42326ac...e5884e0. Read the comment docs.

@maynardGK
Copy link
Contributor Author

So, it is passing when UnsetFocus was re-inserted. Now however we have another significant insertion,
GDLWidget::Init(); was not called if GDL_USE_WX was not set to "YES". Next then, we add
this call after creation of the WX plot device; in earlier failures this call was made before the deviceWX was accessed.

@maynardGK
Copy link
Contributor Author

And now the errors have returned once there is a wxWidget initialization call that actually
gets executed (previously the iitialization call came only when GDL_USE_WX was "YES" - a condition
not set, I assume, in the test).

maynardGK added 2 commits May 6, 2018 21:15
  Line 194 of src/graphicsdevice.cpp should be GDLWidget::Init(); but that call cannot
be made and OSX/clang build will fail in the Travis CI tests.
Otherwise, to summarize:
  UnsetFocus() is called thereby restoring correct window/keyboard focus operation under X, WIN
devices.  No good UnsetFocus() has been found for WX.
  NO_WIDGET_DRAW option will prevent accidental widget_draw widgets when you want none.
  GDLWidget::Init() and GDLWidget::UnInit() are each called from GraphicsDevice::

Greg Jung (aka maynardGK)
[email protected]
@slayoo
Copy link
Member

slayoo commented Jun 14, 2018

@maynardGK should we add a "WIP" prefix to name of this PR?

@maynardGK
Copy link
Contributor Author

maynardGK commented Jun 14, 2018

This is work finished, but it is very ugly stuff! basically I found out that OSX/Clang test will fail if we initialize widgets. I located the init() and uninit() routines to more functionally-appropriate locations and made widgets.cpp survive upon getting errors on a draw widget. For my own use I would tend to use only text aspect of widgets but want the best plot possible; in other applications the integrated Wx
widget is needed.
I don't see much improvement in the situation, WX plotting won't be as good as the X driver, and running a widget_draw with "X" or "WIN" doesn't work right. So I would just assign to Gilles whether to accept or delete this,
or try it out for a while:
The "UnsetFocus" aspect is a noticeable improvement, I still get widgets even though GDLWidget::Init() isn't called - but I'm guessing there are other ill effects to that.

@maynardGK
Copy link
Contributor Author

Actually omitting the GDLWidget::Init() does crush the widget capability, so I'll just close it as it stands.

@maynardGK maynardGK closed this Jun 14, 2018
@slayoo
Copy link
Member

slayoo commented Jun 14, 2018

ok, thanks

@maynardGK maynardGK deleted the OSX_clang_0 branch November 3, 2018 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants