From da8d7fde56bfd7db02598d2880653fa71846abf7 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 28 Mar 2021 18:03:03 -0700 Subject: [PATCH] JavaApplicationStub hacks for Big Sur tabbing mode Java does not support the 'tabbing' stuff that's in Big Sur, so disable it. Signed-off-by: Keith Packard --- altosui/AltosUI.app/Contents/MacOS/JavaApplicationStub | 6 ++++++ micropeak/MicroPeak.app/Contents/MacOS/JavaApplicationStub | 6 ++++++ telegps/TeleGPS.app/Contents/MacOS/JavaApplicationStub | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/altosui/AltosUI.app/Contents/MacOS/JavaApplicationStub b/altosui/AltosUI.app/Contents/MacOS/JavaApplicationStub index 2a525f82..aa96638f 100755 --- a/altosui/AltosUI.app/Contents/MacOS/JavaApplicationStub +++ b/altosui/AltosUI.app/Contents/MacOS/JavaApplicationStub @@ -803,7 +803,13 @@ fi stub_logger "[JavaCommand] '$JAVACMD'" stub_logger "[JavaVersion] $(get_java_version_from_cmd "${JAVACMD}")${JAVACMD_version:+ / $JAVACMD_version}" +# Make sure tabbing mode is disabled for the selected java version +CFBundleIdentifier=net.java.openjdk.$(get_java_version_from_cmd "${JAVACMD}").java + +if [ x$(defaults read ${CFBundleIdentifier} AppleWindowTabbingMode) != "xnever" ]; then + defaults write ${CFBundleIdentifier} AppleWindowTabbingMode never +fi if [ -z "${JAVACMD}" ] || [ ! -x "${JAVACMD}" ] ; then diff --git a/micropeak/MicroPeak.app/Contents/MacOS/JavaApplicationStub b/micropeak/MicroPeak.app/Contents/MacOS/JavaApplicationStub index 2a525f82..aa96638f 100755 --- a/micropeak/MicroPeak.app/Contents/MacOS/JavaApplicationStub +++ b/micropeak/MicroPeak.app/Contents/MacOS/JavaApplicationStub @@ -803,7 +803,13 @@ fi stub_logger "[JavaCommand] '$JAVACMD'" stub_logger "[JavaVersion] $(get_java_version_from_cmd "${JAVACMD}")${JAVACMD_version:+ / $JAVACMD_version}" +# Make sure tabbing mode is disabled for the selected java version +CFBundleIdentifier=net.java.openjdk.$(get_java_version_from_cmd "${JAVACMD}").java + +if [ x$(defaults read ${CFBundleIdentifier} AppleWindowTabbingMode) != "xnever" ]; then + defaults write ${CFBundleIdentifier} AppleWindowTabbingMode never +fi if [ -z "${JAVACMD}" ] || [ ! -x "${JAVACMD}" ] ; then diff --git a/telegps/TeleGPS.app/Contents/MacOS/JavaApplicationStub b/telegps/TeleGPS.app/Contents/MacOS/JavaApplicationStub index 2a525f82..aa96638f 100755 --- a/telegps/TeleGPS.app/Contents/MacOS/JavaApplicationStub +++ b/telegps/TeleGPS.app/Contents/MacOS/JavaApplicationStub @@ -803,7 +803,13 @@ fi stub_logger "[JavaCommand] '$JAVACMD'" stub_logger "[JavaVersion] $(get_java_version_from_cmd "${JAVACMD}")${JAVACMD_version:+ / $JAVACMD_version}" +# Make sure tabbing mode is disabled for the selected java version +CFBundleIdentifier=net.java.openjdk.$(get_java_version_from_cmd "${JAVACMD}").java + +if [ x$(defaults read ${CFBundleIdentifier} AppleWindowTabbingMode) != "xnever" ]; then + defaults write ${CFBundleIdentifier} AppleWindowTabbingMode never +fi if [ -z "${JAVACMD}" ] || [ ! -x "${JAVACMD}" ] ; then -- 2.30.2