Project: SWT
Bug 241062 [consistency] Font#getFontData() not safe from non-ui thread on MacOS
Reported: 2008-07-16 06:39:03 | Status: resolved fixed

This seems to have worked before in 3.3 and changed in 3.4. A call to Font#getFontData() from a non-ui thread results in a SWT exception. For one, the JavaDoc is not speced to throw this exception and second, it works fine on Windows and Linux. The call to Device#getDPI() from getFontData() calls checkDevice() and causes this issue.

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Device.java bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/graphics/Font.java bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Font.java