Permalink
Browse files

don't queue setSize() in the EDT

  • Loading branch information...
codeanticode committed Sep 14, 2015
1 parent b254ed9 commit 42c0150da0f400637de916db1f94a687a7bc4288
Showing with 8 additions and 21 deletions.
  1. +8 −21 core/src/processing/opengl/PSurfaceJOGL.java
@@ -632,29 +632,16 @@ public void setSize(final int width, final int height) {
return;
}
// if (animator.isAnimating()) {
// System.err.println("3. set size");
if (!pgl.presentMode()) {
// sketch.width = width;
// sketch.height = height;
sketch.setSize(width, height);
sketchWidth = width;
sketchHeight = height;
graphics.setSize(width, height);
display.getEDTUtil().invoke(false, new Runnable() {
@Override
public void run() {
window.setSize(width, height);
}
});
}
// }
if (!pgl.presentMode()) {
sketch.setSize(width, height);
sketchWidth = width;
sketchHeight = height;
graphics.setSize(width, height);
window.setSize(width, height);
}
}
public float getPixelScale() {
if (graphics.is2X()) {
// Even if the graphics are retina, the user might have moved the window

0 comments on commit 42c0150

Please sign in to comment.