JavaApplicationStub hacks for Big Sur tabbing mode
authorKeith Packard <keithp@keithp.com>
Mon, 29 Mar 2021 01:03:03 +0000 (18:03 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 29 Mar 2021 01:03:03 +0000 (18:03 -0700)
Java does not support the 'tabbing' stuff that's in Big Sur, so
disable it.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/AltosUI.app/Contents/MacOS/JavaApplicationStub
micropeak/MicroPeak.app/Contents/MacOS/JavaApplicationStub
telegps/TeleGPS.app/Contents/MacOS/JavaApplicationStub

index 2a525f823a0d47253ffef1838380407d51a54ed8..aa96638f5cf9822d1ca1fda58eccc6579903a4f2 100755 (executable)
@@ -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
 
index 2a525f823a0d47253ffef1838380407d51a54ed8..aa96638f5cf9822d1ca1fda58eccc6579903a4f2 100755 (executable)
@@ -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
 
index 2a525f823a0d47253ffef1838380407d51a54ed8..aa96638f5cf9822d1ca1fda58eccc6579903a4f2 100755 (executable)
@@ -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