Window size versus canvas size

One thing I have noticed, if I create a GLCanvas of wisthxheight and put it into a frame widthxheight something funky happens. The canvas is not widthxheight, but it is shrunk to fit in the frame, so the frame decroations use up some of that size. In fact if I read back the color buffer into an image widthxheight there is black along the top and right sides.

Depends on whether or not you want the decorations. If you don’t try dropping it into a Window so it defaults borderless. If you do, then something funky this way comes as the canvas inside the Frame should have its own HWND that JOGL is drawing into (unless the Windows JOGL port did things the hard way :slight_smile: ).

Try with a regular canvas and see if it does indeed entirely fit (best to use an image or something) in the frame. If it doesn’t - you may have found a new GUI bug :slight_smile:

I’ve noticed something like this as well, the canvas seems to loose something like 13px from its height which looks like the size of the title bar. It seems to be the same when i drop it into the center of a border layout, i get the impression that the layout manager is triggering the canvas to resize itself quietly in the background.

I’ll have a tinker and see if i can get anything more definate…