non resizable windows glitch fixed

sometimes non resizable windows would have the incorrect dimensions,
causing them to render slightly incorrectly. this is cause by a margin
in windows inside the JFrame of {25, 3, 3, 3}. essentially a timing
issue.
master
Marcus Gosselin 2015-12-03 04:23:35 -05:00
parent 13c3448ab3
commit 9ec7c17b54
1 changed files with 1 additions and 1 deletions

View File

@ -307,7 +307,6 @@ public class Engine extends Canvas implements KeyListener, MouseMotionListener,
* @param resizable
*/
private static void setWindowProperties(Dimension dimension, boolean resizable) {
frame.setResizable(resizable);
staticMain.setSize(dimension);
frame.pack();
frame.setLocationRelativeTo(null);
@ -318,6 +317,7 @@ public class Engine extends Canvas implements KeyListener, MouseMotionListener,
BUFFER_WIDTH = WIDTH*(retina?2:1);
apps[app].updateDimensions(BUFFER_WIDTH, BUFFER_HEIGHT);
staticMain.createBuffer();
frame.setResizable(resizable);
frame.pack();
}