mirror of
https://github.com/processing/processing4.git
synced 2026-02-15 03:15:40 +01:00
Validate PApplet AWT Container after add of OpenGL canvas.
This fix a long startup delay before OpenGL init that may happen if the OpenGL canvas stay non-visible. Signed-off-by: Xerxes Rånby <xerxes@zafena.se>
This commit is contained in:
@@ -624,6 +624,7 @@ public class PGL {
|
||||
|
||||
pg.parent.setLayout(new BorderLayout());
|
||||
pg.parent.add(canvasAWT, BorderLayout.CENTER);
|
||||
pg.parent.validate();
|
||||
pg.parent.removeListeners(pg.parent);
|
||||
pg.parent.addListeners(canvasAWT);
|
||||
|
||||
@@ -641,6 +642,7 @@ public class PGL {
|
||||
|
||||
pg.parent.setLayout(new BorderLayout());
|
||||
pg.parent.add(canvasNEWT, BorderLayout.CENTER);
|
||||
pg.parent.validate();
|
||||
|
||||
if (events == NEWT) {
|
||||
NEWTMouseListener mouseListener = new NEWTMouseListener();
|
||||
|
||||
Reference in New Issue
Block a user