On Linux with the latest SWT I-build run the following snippet and click the "Click" link. It should open the link in the Browser but after a few seconds quits to desktop. In an RCP app the whole app quits to desktop.
- Works on Windows and Mac
- Crashes on Linux Mint 22.3 (X11) and Ubuntu 26.04 (Wayland)
- Java 21
- Latest SWT I-build
import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class SWTBrowserTest {
public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell(display);
shell.setText("SWT Browser");
shell.setLayout(new FillLayout());
shell.setSize(400, 400);
Browser browser = new Browser(shell, SWT.NONE);
browser.setText("<a href='https://www.eclipse.org' target='_blank'>Click</a>");
browser.addOpenWindowListener(event -> {
event.browser = browser;
});
shell.open();
while(!shell.isDisposed()) {
if(!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
}
On Linux with the latest SWT I-build run the following snippet and click the "Click" link. It should open the link in the Browser but after a few seconds quits to desktop. In an RCP app the whole app quits to desktop.