Probable bug in OpenGLComponent::getInterceptsMouseClicks



I am afraid the “OpenGLComponent::setInterceptsMouseClicks()” method doesn’t work.
It does modify the flags and makes getInterceptsMouseClicks() return accordingly, but at the end of the day, the mouseDown method of the parent is only called when the parent is clicked directly, and not when clicked through its OpenGL child component…

Any idea what could cause it ?

I am pretty sure this is a bug, as when I replace the OpenGL child component with a normal (non-openGL) component, the whole has the expected behaviour.
I am using current version (committed 16 Jun 2010 09:55:00) Platform : Win vista 32bits (though I doubt this is relevant)

Thank you in advance for your help.

Workaround : adding

at the end of the parent’s constructor seems to solve the problem…


Yes, that’s not too surprising, because on win32 it has to add a heavyweight child window for the GL, which will capture all the clicks. The hitTest method won’t work properly, either, as the events aren’t going via the normal channels… I can’t really think of a way to correct it that isn’t a huge amount of work, so your workaround is probably the best plan for now!