This content has been marked as final. Show 3 replies
Fix seems obvious: in stead of relying on the windows messaging, facilitate it yourself through the JNI interface by propagating events you catch on the java side to the native logic. That will probably incur a slight performance hit of course, but you lose the dependency on internal mechanisms.
Thanks for the reply. Yes, what you describe would work around the problem, but I thought of that as a 'brute force' approach :-) My application has been working the same way for years, so I'd prefer to try and find a simpler fix for it.
After a bit of research, I think the issue could be due to changes in how focus is handled for JDK 7:
so I'll investigate this first.
For the record, here's how I solved the problem:
The Canvas that was used for native rendering didn't receive any mouse events; they appeared to be lost somehow. Although my native CView-derived class didn't receive focus events, I noticed that CView::OnMouseActivate() was still being called when I clicked on the Canvas. I overrode this function and added a call to SetFocus(), which was enough to cause mouse wheel and keyboard messages to be passed to my native View.