[userinterface] problems in window mode

Just in case anyone cares, here’s another userinterface issue:

If you work in windowed mode, events at the border of UIWindows are not caught correctly. The reason for this are the main window borders. The Xith3D userinterface gets wrong dimensions for the Canvas3D. Example: If I create a 1024x768 canvas, I have only 1016x742 pixels to draw on. This means the distance of my mouse pointer to the upper border of a UIWindow has to be at least 26 pixels. :slight_smile: Probably Canvas3D has to be extended to contain methods which return the size with and without window borders. Other parts of Xith3D could be affected by this issue, too.

A small fix is changing the first lines of UIWindowManager.calcImagePlate() to:


canvasDim.height = c3d.get3DPeer().getComponent().getHeight();
canvasDim.width = c3d.get3DPeer().getComponent().getWidth();

This breaks the render abstraction layer (like the event management in general), so this is not really solving the problems. Any thoughts?

Maybe we need to define our own abstract concept of a Window and Events like we currently do with the rendering.

An abstract event model, at least for keyboard and mouse events of the main Canvas3D would be nice too (as for the Swing components, they are probably fine just as they are now arn’t they?).

Will.