Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Systray icons not working correctly for Java apps #3139

Closed
jmgomezpoveda opened this issue May 13, 2014 · 11 comments
Closed

Systray icons not working correctly for Java apps #3139

jmgomezpoveda opened this issue May 13, 2014 · 11 comments

Comments

@jmgomezpoveda
Copy link

Java applications using the standard system tray (http://docs.oracle.com/javase/tutorial/uiswing/misc/systemtray.html) are not working correctly in Cinnamon. Tested with Oracle's JDK 7 & 8, and with OpenJDK 7.

Issues observed:

  • When setting trayIcon.setImageAutoSize(true), the icon is rendered in 1/4 of the space (i.e. in the top-left quadrant).
  • The display, tooltips, or menus are really small AND behind the panel, so totally unusable.

This might be partially related to HiDPI. Using Cinnamon 2.2.1-20140414040006-trusty.

@jmgomezpoveda
Copy link
Author

Note that Vuze does not show this problem, even if it is also developed in Java. Vuze does not use the standard classes in the JDK, but Eclipse's SWT (www.eclipse.org/swt/), so they are probably doing something custom instead of relying on the standard classes.

@mtwebster
Copy link
Member

Would it be possible to try this with the latest Cinnamon? We've reworked the status icons quite a bit since 2.2.1 (because of the types of problems you're describing).

@jmgomezpoveda
Copy link
Author

Just upgraded to Cinnamon 2.2.8-20140512040006 (the current nightly). The behaviour is exactly the same, for both issues (icon, and tooltip/menus). On a separate note, the clock has disappeared with this update.

In case it can be of any use, I've noticed the icon displays the same in GNOME 3.12 (after the legacy tray icons are enabled). In GNOME's case, tooltips or menus do not appear at all (not even tiny and behind the panel).

@jmgomezpoveda
Copy link
Author

The icon size issue can be replicated just using Oracle's sample: http://docs.oracle.com/javase/tutorial/uiswing/examples/zipfiles/misc-TrayIconDemoProject.zip

@mtwebster
Copy link
Member

I'm trying it out now, thanks

@jmgomezpoveda
Copy link
Author

I'd say the icon size is most likely linked to the HiDPI screen. I've tried Unity and XFCE, and they both render the icon fine by default (but tiny, due to their lack or partial HiDPI support).

In Unity, when changing the scaling factor I can see the icon render smaller than it should (similar to the issue in Cinnamon, but the icon is cropped vertically). There is no scale option in XFCE.

Note, however, outside the icon size in HiDPI mode, and the tiny fonts displayed, the tooltip and context menu of the tray icon are in both cases (Unity and XFCE) functional.

@calestyo
Copy link

Having similar problems here with Java systray icons (and there #3515 with non-Java):

The first one is with "allow Cinnamon to scale panel text and icons according to the panel hights" UNchecked:
screen1

This is with the option checked:
screen2

Now that the icon isn't scaled, also happened under GNOME classic... but the false background colours are new.

@calestyo
Copy link

(Above is on Debian and the Java is program is Jitsi).. btw, it's not only the blue background that is wrong, but the logo should also be coloured.

@pquiring
Copy link

Here is an updated sample of the problem:

This is cinnamon 2.6.13 (Mint 17.2)
cinnamon

And here is Ubuntu unity and what it should look like:
unity

You'll notice the tooltip and popup menu are under the panel with Cinnamon.
This is a Java application available at http://jfpasswords.sourceforge.net

Thanks.

@tux-86
Copy link

tux-86 commented Jul 24, 2016

I have same problem with Vuze in Cinnamon 3.0.7.

@JosephMcc
Copy link
Contributor

Trying to keep all the systray related issues together in one place: #481

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants