From 67940fcd12415f3511b7e895a15367dc09f1419f Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Tue, 11 Jan 2022 00:16:36 -0500 Subject: [PATCH] clean up some of this phrasing --- core/src/processing/core/PApplet.java | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index adcd4b452..872553ca5 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -863,17 +863,25 @@ public class PApplet implements PConstants { } catch (InterruptedException ignored) { } if (resultCode == 1) { - System.err.println("Could not check the status of “Displays have separate spaces.”"); - System.err.format("Received message '%s' and result code %d.%n", trim(stderr.toString()), resultCode); + String msg = trim(stderr.toString()); + // This message is confusing, so don't print if it's something typical + if (!(msg.contains("The domain/default pair") && msg.contains("does not exist"))) { + System.err.println("Could not check the status of “Displays have separate spaces.”"); + System.err.println("Result for 'defaults read' was " + resultCode); + System.err.println(msg); + } } String processOutput = trim(stdout.toString()); - // It looks like on Catalina, the option may not be set, so resultCode - // will be 1 (an error, since the param doesn't exist. But "Displays - // have separate spaces" is on by default, so show the message. + // On Catalina, the option may not be set, so resultCode + // will be 1 (an error, since the param doesn't exist.) + // But "Displays have separate spaces" is on by default. + // For Monterey, it appears to not be set until the user + // has visited the Mission Control preference pane once. if (resultCode == 1 || "0".equals(processOutput)) { - System.err.println("To use fullScreen(SPAN), first turn off “Displays have separate spaces”"); - System.err.println("in System Preferences \u2192 Mission Control. Then log out and log back in."); + System.err.println("To use fullScreen(SPAN), visit System Preferences \u2192 Mission Control"); + System.err.println("and make sure that “Displays have separate spaces” is turned off."); + System.err.println("Then log out and log back in."); } }