Skip to content

Commit 6e9a8e0

Browse files
committed
prevent "run sketches on display" message from showing up on startup
1 parent 148c010 commit 6e9a8e0

3 files changed

Lines changed: 38 additions & 33 deletions

File tree

core/todo.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
0261 (3.3.4 or 3.4)
22

3+
_ set the application name to sketch name (not processing.core.PApplet)
4+
_ System.setProperty("com.apple.mrj.application.apple.menu.about.name", ...)
5+
_ -Xdock:name=<application name>
6+
_ -Xdock:icon=<path to icon file>
7+
8+
_ WARNING: GL pipe is running in software mode (Renderer ID=0x1020400)
9+
_ is this coming from us? if so, need to provide actions
10+
311

412
high
513
_ implement sketch scaling into PApplet
@@ -533,14 +541,6 @@ _ InvScreenX, Y, Z to convert screen (mouse) coordinates to model coordinates
533541
_ https://github.com/processing/processing/issues/1609
534542

535543

536-
CORE / Mac OS X
537-
538-
_ set the application name to sketch name (not processing.core.PApplet)
539-
_ System.setProperty("com.apple.mrj.application.apple.menu.about.name", ...)
540-
_ -Xdock:name=<application name>
541-
_ -Xdock:icon=<path to icon file>
542-
543-
544544
CORE / Events
545545

546546
_ touch events.. can't do MouseEvent et al with Android

java/src/processing/mode/java/runner/Runner.java

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,9 @@ protected StringList getSketchParams(boolean present, String[] args) {
376376
} else {
377377
params.append("processing.core.PApplet");
378378

379-
// get the stored device index (starts at 1)
379+
// Get the stored device index (starts at 1)
380+
// By default, set to -1, meaning 'the default display',
381+
// which is the same display as the one being used by the Editor.
380382
int runDisplay = Preferences.getInteger("run.display");
381383

382384
// If there was a saved location (this guy has been run more than once)
@@ -395,23 +397,26 @@ protected StringList getSketchParams(boolean present, String[] args) {
395397

396398
// Make sure the display set in Preferences actually exists
397399
GraphicsDevice runDevice = editorDevice;
398-
if (runDisplay > 0 && runDisplay <= devices.length) {
399-
runDevice = devices[runDisplay-1];
400-
} else {
401-
// If a bad display is selected, use the same display as the editor
402-
if (runDisplay > 0) { // don't complain about -1 or 0
403-
System.err.println("Display " + runDisplay + " not available.");
404-
}
405-
runDevice = editorDevice;
406-
for (int i = 0; i < devices.length; i++) {
407-
if (devices[i] == runDevice) {
408-
// Wasn't setting the pref to avoid screwing things up with
409-
// something temporary. But not setting it makes debugging one's
410-
// setup just too damn weird, so changing that behavior.
411-
runDisplay = i + 1;
412-
System.err.println("Setting 'Run Sketches on Display' preference to display " + runDisplay);
413-
Preferences.setInteger("run.display", runDisplay);
414-
break;
400+
if (runDisplay > 0) {
401+
if (runDisplay <= devices.length) {
402+
runDevice = devices[runDisplay-1];
403+
404+
} else {
405+
// If a bad display is selected, use the same display as the editor
406+
if (runDisplay > 0) { // don't complain about -1 or 0
407+
System.err.println("Display " + runDisplay + " not available.");
408+
}
409+
runDevice = editorDevice;
410+
for (int i = 0; i < devices.length; i++) {
411+
if (devices[i] == runDevice) {
412+
// Wasn't setting the pref to avoid screwing things up with
413+
// something temporary. But not setting it makes debugging one's
414+
// setup just too damn weird, so changing that behavior.
415+
runDisplay = i + 1;
416+
System.err.println("Setting 'Run Sketches on Display' preference to display " + runDisplay);
417+
Preferences.setInteger("run.display", runDisplay);
418+
break;
419+
}
415420
}
416421
}
417422
}

todo.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@ o https://github.com/processing/processing/pull/4935
44
X https://github.com/processing/processing/issues/4825
55
X clean up error message for sketchbook location
66
X https://github.com/processing/processing/issues/4942
7+
X Application Exports report as "Damaged" on macOS Sierra
8+
X https://github.com/processing/processing/issues/4705
9+
X could provide script to un-quarrantine
10+
X xattr -d -r com.apple.quarantine
11+
X https://github.com/steakknife/unsign
12+
X https://developer.apple.com/library/content/technotes/tn2318
13+
X 'run sketches on display' message shows up on clean install
714

815
gohai
916
X IO library updates
1017
X https://github.com/processing/processing/pull/5044
1118

12-
_ Application Exports report as "Damaged" on macOS Sierra
13-
_ https://github.com/processing/processing/issues/4705
14-
_ could provide script to un-quarrantine
15-
_ xattr -d -r com.apple.quarantine
16-
_ https://github.com/steakknife/unsign
17-
1819
_ should ant run launch the .app so that launchsvcs stuff works properly?
1920

2021
_ sketch.properties not being written if initial mode is p5.js?
@@ -85,7 +86,6 @@ _ https://github.com/processing/processing/issues/4805
8586

8687
_ "error during export" message, but no error message contents come through
8788
_ e.g. https://github.com/processing/processing/issues/4792
88-
_ 'run sketches on display' message shows up on clean install
8989

9090
_ report of a library or tool (probably includes 2.x? 1.x?) breaking things
9191
_ NoSuchFieldError: useNativeSelect

0 commit comments

Comments
 (0)