Open elaskavaia opened 1 year ago
this is screenshot of eclipse launcher, but they all look the same
Are you using Wayland? You can check in your system settings.
This is out of the box installation of ubuntu-22.04-desktop-amd64.iso - minimal install on virtual box (but I don't think it matter about virual box)? The windowing system is Wayland indeed
Is there is workaround I will be happy to hear about it
Looked into this more. It's a result of Wayland not supporting setting icons programatically. See: https://gitlab.gnome.org/GNOME/gtk/-/issues/1602.
Now from some research this by including a *.desktop file with Eclipse. This might need to be accompanied by calling GLib.set_prgname() but not sure about this part. I won't be able to fix this myself but hopefully this helps.
Describe the bug Setting application icon no longer works on Ubuntu 22 (and RHEL 8) You can also see that eclipse installer and any eclipse apps installed from zip do not have proper icon It works on Ubuntu 20 and below
To Reproduce import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell;
public class MainClass { public static void main(String[] a) { Display d = new Display(); Shell s = new Shell(d); s.setSize(500, 500); s.setImage(new Image(d, "icon.png")); // should be a real .png file in current dir from where it is launched, I used 32 px s.setText("An application icon example"); s.open(); while (!s.isDisposed()) { if (!d.readAndDispatch()) d.sleep(); } d.dispose(); } }
Expected behavior Expected to see icon change in launch bar (usually bar on the left but depends on window manager)
Screenshots Default icon is shown (looks like gears)
Environment:
Select the platform(s) on which the behavior is seen:
Additional OS info (e.g. OS version, Linux Desktop, etc) Ubuntu 22 - default image ubuntu-22.04-desktop-amd64.iso gtk 3.24.33 gtk 2.24.33 gtk 4.6.2
JRE/JDK version - openjdk 11
Version since I did not check other version, it may not work in any I tried 3.120 (gtk)