|
3 | 3 | /* |
4 | 4 | Part of the Processing project - http://processing.org |
5 | 5 |
|
6 | | - Copyright (c) 2012-15 The Processing Foundation |
| 6 | + Copyright (c) 2012-20 The Processing Foundation |
7 | 7 | Copyright (c) 2004-12 Ben Fry and Casey Reas |
8 | 8 | Copyright (c) 2001-04 Massachusetts Institute of Technology |
9 | 9 |
|
@@ -114,6 +114,9 @@ public class PSurfaceJOGL implements PSurface { |
114 | 114 |
|
115 | 115 | protected boolean external = false; |
116 | 116 |
|
| 117 | + // Workaround for https://github.com/processing/processing4/issues/124 |
| 118 | + static private boolean issue124 = PApplet.platform == PConstants.MACOS; |
| 119 | + |
117 | 120 |
|
118 | 121 | public PSurfaceJOGL(PGraphics graphics) { |
119 | 122 | this.graphics = graphics; |
@@ -408,7 +411,11 @@ protected void initWindow() { |
408 | 411 | window.setSurfaceScale(new float[] { surfaceScale, surfaceScale }); |
409 | 412 |
|
410 | 413 | window.setSize(sketchWidth * windowScaleFactor, sketchHeight * windowScaleFactor); |
411 | | - window.setResizable(true); |
| 414 | + if (issue124) { |
| 415 | + window.setResizable(true); |
| 416 | + } else { |
| 417 | + window.setResizable(false); |
| 418 | + } |
412 | 419 | setSize(sketchWidth, sketchHeight); |
413 | 420 | if (fullScreen) { |
414 | 421 | PApplet.hideMenuBar(); |
@@ -949,6 +956,11 @@ public void display(GLAutoDrawable drawable) { |
949 | 956 | pgl.endRender(sketch.sketchWindowColor()); |
950 | 957 | } |
951 | 958 | PGraphicsOpenGL.completeFinishedPixelTransfers(); |
| 959 | + |
| 960 | + if (issue124) { |
| 961 | + setResizable(false); |
| 962 | + issue124 = false; |
| 963 | + } |
952 | 964 | } |
953 | 965 |
|
954 | 966 | if (sketch.exitCalled()) { |
|
0 commit comments