|
20 | 20 | Boston, MA 02111-1307 USA |
21 | 21 | */ |
22 | 22 |
|
23 | | -package processing.core; |
| 23 | +package processing.awt; |
24 | 24 |
|
25 | 25 | import java.awt.*; |
26 | 26 | import java.awt.event.*; |
|
32 | 32 |
|
33 | 33 | import javax.swing.JFrame; |
34 | 34 |
|
| 35 | +import processing.core.PApplet; |
| 36 | +import processing.core.PConstants; |
| 37 | +import processing.core.PGraphics; |
| 38 | +import processing.core.PImage; |
| 39 | +import processing.core.PSurfaceNone; |
35 | 40 | import processing.event.KeyEvent; |
36 | 41 | import processing.event.MouseEvent; |
37 | 42 |
|
@@ -101,7 +106,7 @@ public PSurfaceAWT(PGraphics graphics) { |
101 | 106 | canvas.addComponentListener(new ComponentAdapter() { |
102 | 107 | @Override |
103 | 108 | public void componentResized(ComponentEvent e) { |
104 | | - if (!sketch.looping) { |
| 109 | + if (!sketch.isLooping()) { |
105 | 110 | // make sure this is a real resize event, not just initial setup |
106 | 111 | // https://github.com/processing/processing/issues/3310 |
107 | 112 | Dimension canvasSize = canvas.getSize(); |
@@ -792,16 +797,16 @@ public void placeWindow(int[] location, int[] editorLocation) { |
792 | 797 | // needs to resize the frame, which will resize the canvas, and so on... |
793 | 798 | @Override |
794 | 799 | public void setSize(int wide, int high) { |
795 | | - if (PApplet.DEBUG) { |
796 | | - //System.out.format("frame visible %b, setSize(%d, %d) %n", frame.isVisible(), wide, high); |
797 | | - new Exception(String.format("setSize(%d, %d)", wide, high)).printStackTrace(System.out); |
798 | | - } |
| 800 | +// if (PApplet.DEBUG) { |
| 801 | +// //System.out.format("frame visible %b, setSize(%d, %d) %n", frame.isVisible(), wide, high); |
| 802 | +// new Exception(String.format("setSize(%d, %d)", wide, high)).printStackTrace(System.out); |
| 803 | +// } |
799 | 804 |
|
800 | 805 | //if (wide == sketchWidth && high == sketchHeight) { // doesn't work on launch |
801 | 806 | if (wide == sketch.width && high == sketch.height) { |
802 | | - if (PApplet.DEBUG) { |
803 | | - new Exception("w/h unchanged " + wide + " " + high).printStackTrace(System.out); |
804 | | - } |
| 807 | +// if (PApplet.DEBUG) { |
| 808 | +// new Exception("w/h unchanged " + wide + " " + high).printStackTrace(System.out); |
| 809 | +// } |
805 | 810 | return; // unchanged, don't rebuild everything |
806 | 811 | } |
807 | 812 |
|
|
0 commit comments