Fix Display.getWidth() and Display.getHeight() to return the correct values on OS X when the window has been resized.
This commit is contained in:
parent
d2174850be
commit
6f40eeb58a
|
@ -111,6 +111,16 @@ final class MacOSXFrame extends Frame implements WindowListener, ComponentListen
|
|||
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;
|
||||
|
|
Loading…
Reference in New Issue