Skip to content

Commit f0691c0

Browse files
committed
change how size(displayWidth, displayHeight) works (fixes processing#3545)
1 parent 2e1dd4b commit f0691c0

5 files changed

Lines changed: 24 additions & 1 deletion

File tree

app/src/processing/app/ui/Editor.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2985,6 +2985,11 @@ public void statusError(Exception e) {
29852985
if (mess.startsWith(illString)) {
29862986
mess = mess.substring(illString.length());
29872987
}
2988+
// This is confusing and common with the size() and fullScreen() changes
2989+
String illState = "IllegalStateException: ";
2990+
if (mess.startsWith(illState)) {
2991+
mess = mess.substring(illState.length());
2992+
}
29882993
statusError(mess);
29892994
}
29902995
// e.printStackTrace();

core/src/processing/awt/PSurfaceAWT.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,13 +422,19 @@ public void initFrame(final PApplet sketch) {/*, int backgroundColor,
422422
sketchHeight = sketch.sketchHeight();
423423

424424
boolean fullScreen = sketch.sketchFullScreen();
425+
// Removing the section below because sometimes people want to do the
426+
// full screen size in a window, and it also breaks insideSettings().
427+
// With 3.x, fullScreen() is so easy, that it's just better that way.
428+
// https://github.com/processing/processing/issues/3545
429+
/*
425430
// Sketch has already requested to be the same as the screen's
426431
// width and height, so let's roll with full screen mode.
427432
if (screenRect.width == sketchWidth &&
428433
screenRect.height == sketchHeight) {
429434
fullScreen = true;
430435
sketch.fullScreen(); // won't change the renderer
431436
}
437+
*/
432438

433439
if (fullScreen || spanDisplays) {
434440
sketchWidth = screenRect.width;

core/src/processing/opengl/PSurfaceJOGL.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,13 +273,19 @@ protected void initWindow() {
273273
sketchHeight = sketch.sketchHeight();
274274

275275
boolean fullScreen = sketch.sketchFullScreen();
276+
// Removing the section below because sometimes people want to do the
277+
// full screen size in a window, and it also breaks insideSettings().
278+
// With 3.x, fullScreen() is so easy, that it's just better that way.
279+
// https://github.com/processing/processing/issues/3545
280+
/*
276281
// Sketch has already requested to be the same as the screen's
277282
// width and height, so let's roll with full screen mode.
278283
if (screenRect.width == sketchWidth &&
279284
screenRect.height == sketchHeight) {
280285
fullScreen = true;
281286
sketch.fullScreen();
282287
}
288+
*/
283289

284290
if (fullScreen || spanDisplays) {
285291
sketchWidth = screenRect.width;

core/todo.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
0240 core (beta 2)
1+
0240 core (3.0b2)
2+
X make size(displayWidth, displayHeight) still run in a window
3+
X prevents "fullScreen() cannot be used here" message on startup
4+
X https://github.com/processing/processing/issues/3545
25

36

47
docs

todo.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
0240 (3.0b2)
2+
_ if no platforms selected in export, will still say "done exporting!"
3+
_ maybe if none selected, should default select the current platform
4+
_ why are none selected in the first place? not getting saved?
25

36

47
3.0 final

0 commit comments

Comments
 (0)