Skip to content

Commit 5c85264

Browse files
committed
implement a terrible hack for #104 so we can ship
1 parent 2e79478 commit 5c85264

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

core/src/processing/opengl/PSurfaceJOGL.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
Part of the Processing project - http://processing.org
55
6-
Copyright (c) 2012-15 The Processing Foundation
6+
Copyright (c) 2012-20 The Processing Foundation
77
Copyright (c) 2004-12 Ben Fry and Casey Reas
88
Copyright (c) 2001-04 Massachusetts Institute of Technology
99
@@ -114,6 +114,9 @@ public class PSurfaceJOGL implements PSurface {
114114

115115
protected boolean external = false;
116116

117+
// Workaround for https://github.com/processing/processing4/issues/124
118+
static private boolean issue124 = PApplet.platform == PConstants.MACOS;
119+
117120

118121
public PSurfaceJOGL(PGraphics graphics) {
119122
this.graphics = graphics;
@@ -408,7 +411,11 @@ protected void initWindow() {
408411
window.setSurfaceScale(new float[] { surfaceScale, surfaceScale });
409412

410413
window.setSize(sketchWidth * windowScaleFactor, sketchHeight * windowScaleFactor);
411-
window.setResizable(true);
414+
if (issue124) {
415+
window.setResizable(true);
416+
} else {
417+
window.setResizable(false);
418+
}
412419
setSize(sketchWidth, sketchHeight);
413420
if (fullScreen) {
414421
PApplet.hideMenuBar();
@@ -949,6 +956,11 @@ public void display(GLAutoDrawable drawable) {
949956
pgl.endRender(sketch.sketchWindowColor());
950957
}
951958
PGraphicsOpenGL.completeFinishedPixelTransfers();
959+
960+
if (issue124) {
961+
setResizable(false);
962+
issue124 = false;
963+
}
952964
}
953965

954966
if (sketch.exitCalled()) {

0 commit comments

Comments
 (0)