-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Description
Describe the bug
Until recently Program.getImageData returned an image for .exe files. Now it doesn't any more.
To Reproduce
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.program.*;
import org.eclipse.swt.widgets.*;
public class ProgramIcons {
public static void main(String[] args) {
final Display display = new Display();
final Program exeProgram = Program.findProgram(".exe");
final ImageData imageData = exeProgram.getImageData();
final Image image = new Image(display, imageData);
final Shell shell = new Shell(display);
shell.addListener(SWT.Paint, event -> {
event.gc.drawImage(image, 0, 0);
});
shell.setSize(400, 300);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
image.dispose();
display.dispose();
}
}Expected behavior
It still should return the generic file icon.
Environment:
- Select the platform(s) on which the behavior is seen:
-
- All OS
-
- Windows
-
- Linux
-
- macOS
-
Additional OS info (e.g. OS version, Linux Desktop, etc)
Windows 11 -
JRE/JDK version
Version since
Since commit 97ca656.
Workaround (or) Additional context
No workaround known.
Metadata
Metadata
Assignees
Labels
No labels
