Basically, when I pop the Display onto a canvas in a JFrame, and resize the JFrame, I can have the area I render to resize with the canvas if I make calls to glViewport that reference the size of the canvas.
glViewport(0, 0, parent.getWidth(), parent.getHeight());
However, if I make that call reference the dimensions in the DisplayMode (which I would hope would return the same values), like this:
glViewport(0, 0, Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight());
Then the values return by getWidth() and getHeight() haven't changed from their initial settings, and I'm rendering to the same section of the canvas as before.
This seems like a bug - obviously, the DisplayMode's dimensions have changed, because the enlarged canvas means I can render to a bigger area. Could this be fixed in the next release?