| Summary: | [macOS BigSur] Any listener for SWT.EraseItem breaks checkboxes and images | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Ned Twigg <ned.twigg> |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jeeeyul, lshanmug, twolf |
| Version: | 4.17 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=565969 | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 565691 | ||
I should add that this is the only BigSur bug I have seen, so great work SWT team! It looks duplicated with #565969 *** This bug has been marked as a duplicate of bug 565969 *** Confirmed fixed in 4.18, thanks! |
On MacOS BigSur 11.0.1, if you add any listener to SWT.EraseItem, then Tables will no longer render checkboxes or images correctly. This was not true in 10.15 Catalina. I have confirmed this behavior with SWT 4.16 and 4.17. An example which reproduces this is below: import org.eclipse.swt.SWT; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableItem; public class MacBigSurTable { public static void main(String[] args) { Display display = Display.getDefault(); Shell underTest = new Shell(display, SWT.SHELL_TRIM); underTest.setLayout(new FillLayout()); createTable(underTest, "works"); Table brokenTable = createTable(underTest, "broken"); brokenTable.addListener(SWT.EraseItem, e -> { // breaks the table even if it doesn't do anything at all }); underTest.open(); while (!underTest.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } } private static Table createTable(Shell parent, String name) { Group group = new Group(parent, SWT.SHADOW_ETCHED_IN); group.setText(name); group.setLayout(new FillLayout()); Table table = new Table(group, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION | SWT.CHECK); TableItem item = new TableItem(table, SWT.NONE); item.setText("Test"); return table; } }