Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2021-02-15 18:10:29 +0000
committerLakshmi Shanmugam2021-04-07 11:40:45 +0000
commite8cb954cb95ce6e2e33800755db7cc8eeb3c3c2c (patch)
treeb9705609f7792f37fea7aa7ea36c7e8f5dd96c81
parent0cffb2503b4f6893835caf847bb8eb6cc4837987 (diff)
downloadeclipse.platform.swt-e8cb954cb95ce6e2e33800755db7cc8eeb3c3c2c.tar.gz
eclipse.platform.swt-e8cb954cb95ce6e2e33800755db7cc8eeb3c3c2c.tar.xz
eclipse.platform.swt-e8cb954cb95ce6e2e33800755db7cc8eeb3c3c2c.zip
Bug 567389 - [Big Sur] Selected TabFolder's text is invisible on macOS11
Added method OS.isBigSurOrLater to detect BigSur OS. Change-Id: Iddebc964426aada862934c7d60481678ed2a89f3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
index 14726feb9f..d3001264a9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java
@@ -210,6 +210,17 @@ public class OS extends C {
OS.beginSheetModalForWindow(id.id, OS.sel_beginSheetModalForWindow_completionHandler_, window != null ? window.id : 0, handler);
}
+ /**
+ * @return true for macOS BigSur or later, returns false for macOS 10.15 and older
+ */
+ public static boolean isBigSurOrLater () {
+ /*
+ * Currently Big Sur OS version matches with 10.16 and not 11.0. This may be temporary.
+ * Creating a method, so that it can be fixed in one place if/when this changes.
+ */
+ return OS.VERSION_MMB >= OS.VERSION_MMB(10, 16, 0);
+ }
+
/** JNI natives */
/** @method flags=jni */

Back to the top