From: <ka...@us...> - 2012-04-14 18:55:48
|
Revision: 3761 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3761&view=rev Author: kappa1 Date: 2012-04-14 18:55:40 +0000 (Sat, 14 Apr 2012) Log Message: ----------- Fix Display.getWidth() and Display.getHeight() to return the correct values on OS X when the window has been resized. Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXFrame.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXFrame.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXFrame.java 2012-04-10 13:23:08 UTC (rev 3760) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXFrame.java 2012-04-14 18:55:40 UTC (rev 3761) @@ -110,7 +110,17 @@ Insets insets = getInsets(); setBounds(x, y, width + insets.left + insets.right, height + insets.top + insets.bottom); } + + public int getWidth() { + Insets insets = getInsets(); + return super.getWidth() - insets.left - insets.right; + } + public int getHeight() { + Insets insets = getInsets(); + return super.getHeight() - insets.top - insets.bottom; + } + public Rectangle syncGetBounds() { synchronized ( this ) { return bounds; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |