From ef072664f9905c077d42a90ef37258ce317527f4 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Sat, 16 May 2015 21:09:13 -0400 Subject: [PATCH] properly set stage size --- core/src/processing/core/PSurfaceFX.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/processing/core/PSurfaceFX.java b/core/src/processing/core/PSurfaceFX.java index fa5007f2f..4d0937cb3 100644 --- a/core/src/processing/core/PSurfaceFX.java +++ b/core/src/processing/core/PSurfaceFX.java @@ -141,14 +141,14 @@ public class PSurfaceFX implements PSurface { } }).start(); + // wait for stage to be initialized on its own thread before continuing while (stage == null) { - // wait for stage to be initialized before continuing try { - System.out.println("waiting for launch"); + //System.out.println("waiting for launch"); Thread.sleep(5); } catch (InterruptedException e) { } } - //return frame; + setSize(sketch.sketchWidth(), sketch.sketchHeight()); }