Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Cocoa SWT GLCanvas Event Handling Problems

As we are on the way to prepare our applications for Eclipse 3.5, we've tried out the Cocoa 64bit builds. As it seems, there is a problem with event handling of GLCanvas: When registering Mouse Listeners to the Canvas, mouse events are not received. The problem seems to be around here (Constructor of GLCanvas.java):

glView = (NSOpenGLView)new NSOpenGLView().alloc();
if (glView == null) {
dispose ();
SWT.error (SWT.ERROR_UNSUPPORTED_DEPTH);
}
glView.initWithFrame(parent.view.bounds(), pixelFormat);
glView.setAutoresizingMask(OS.NSViewWidthSizable | OS.NSViewHeightSizable);
parent.view.addSubview(glView);



Since the glView is added to the parent's view, mouse event still go to the view of GLCanvas (I guess...). I've been able to receive mouse events, when i change the last line to:

view.addSubview(glView)

But then autoresizing isnt working, and I havent been able to find a solution for this so far.

/Stefan Muller Arisona
Software Architect, Procedural Inc.


Back to the top