Bug 1014448 - Java app system tray icons broken in GNOME Shell
Summary: Java app system tray icons broken in GNOME Shell
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.8.0-openjdk
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mario Torre
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-02 04:51 UTC by Robert Hancock
Modified: 2020-11-04 01:21 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 01:21:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Test Case (1.27 KB, text/plain)
2015-07-09 17:56 UTC, Kyle Berezin
no flags Details

Description Robert Hancock 2013-10-02 04:51:08 UTC
Description of problem:
Java apps with system tray icons do not work properly with GNOME Shell. See below.

Version-Release number of selected component (if applicable):
java-1.7.0-openjdk-1.7.0.60-2.4.2.5.fc19.x86_64

How reproducible:
Every time

Steps to Reproduce:
1. Get and run the http://docs.oracle.com/javase/tutorial/uiswing/misc/systemtray.html demo application
2.
3.

Actual results:
System tray icon shows up in notification area (though only if you open the Activities view and pull down at the bottom of the screen). However the icon seems to be incorrectly scaled (the image is at the top left of the icon instead of being scaled to fill it). Worse, the tooltip and pop-up menu do not work at all. And a useless icon shows up in the running apps list labelled misc-TrayIconDemo.

Expected results:
Tray icon works as expected. No useless icon in apps list.

Additional info:
java-1.8.0-openjdk seems broken as well.

Comment 1 s8dragon 2014-01-20 18:21:41 UTC
same problem with gnome-shell 3.10.3 and jre7-openjdk 7.u51_2.4.4

Comment 2 Robert Hancock 2014-02-09 22:25:29 UTC
Confirmed still an issue in F20.

Comment 3 tom.jenkinson 2014-03-07 13:21:36 UTC
verified on:

[tom@dhcppc1 smsapp_pc](master) (13:16:38) $ gnome-shell --version
GNOME Shell 3.10.3
[tom@dhcppc1 smsapp_pc](master) (13:16:38) $ java -version
java version "1.7.0_51"
OpenJDK Runtime Environment (fedora-2.4.4.1.fc20-x86_64 u51-b02)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

Comment 4 Fedora End Of Life 2015-05-29 09:29:49 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Robert Hancock 2015-05-30 00:12:33 UTC
Still an issue in F22. When running the tray icon demo app, a black square icon appears in the notification list at the bottom left, but it doesn't respond to any mouse clicks.

Comment 6 Zhiyuan Ma 2015-06-26 22:21:39 UTC
verified on 

[ma@fedora-ma ~] $ gnome-shell --version
GNOME Shell 3.16.2
[ma@fedora-ma ~] $ java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
[ma@fedora-ma ~] $

Comment 7 Kyle Berezin 2015-07-04 07:39:44 UTC
Same issue. The icon shows up on the top left instead of the tray most of the time, but not always.

Comment 8 Kyle Berezin 2015-07-09 17:56:37 UTC
Created attachment 1050382 [details]
Test Case

A simple test case. The tray icon should be white and on the bottom left but often appears on the top left. This sample was made only to demonstrate the icon placement issue, not the popup menu issue. This was tested in a virtual machine and changing its thread waiting and system ram/cpu changed the chance of the issue occurring unpredictably, some times it would would happen 99% of the time others close to 0%.

Comment 9 Andrew John Hughes 2016-03-01 17:22:42 UTC
Moving to java-1.8.0-openjdk based on comment 6; Fedora no longer has java-1.7.0-openjdk.

Comment 10 customercare 2016-03-31 13:33:26 UTC
if we can get the icon in the upper tray bar, the would solve so many problems. If the menu would work too, would be good.  Having it of the left top corner  would be a relieve, i tell you :)

Comment 11 Robert Hancock 2016-06-28 05:57:09 UTC
No change in F24.

Comment 12 customercare 2017-03-31 09:02:21 UTC
no change in F25

Comment 13 customercare 2017-03-31 09:03:29 UTC
BTW: using cinnamon this does not happen. It's a GNOME ONLY problem.

Comment 14 Fedora End Of Life 2017-11-16 19:23:17 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 15 Robert Hancock 2017-11-17 00:58:41 UTC
Well in F27 Java now seems to report that the system tray is unsupported. Which I guess makes more sense than having a broken icon.

Comment 16 jamie 2017-11-17 01:06:39 UTC
Gnome in F27 has no system tray? I am developing an app that uses the system tray and this is important to note.

Comment 17 Mario Torre 2017-11-17 11:06:20 UTC
This is a desktop feature, Java has *some* support for that, but it's the desktop that needs to honour the request, and afaik in latest Gnome this has been deprecated, and now I guess removed.

I'll look into that next week and see if I can make up something quick, but I don't really expect to be able to fix this, in Linux desktop, there doesn't seem to be a standard way of doing things anymore...

I'm moving this to f27 for now, but I won't be able to test it until at least next week.

Comment 18 customercare 2017-11-17 13:40:27 UTC
in this special case, the openjava devs need to implement the new api into java,
as other programms with a systemtray work under gnome and any other desktop.

We all may not like the gnome systemtray changes, but someone has to jump over it's shadow and i don't believe it will be the gnome devs.

Could you please try to persuade the java devs to make the jump ? Please :)

Comment 19 jamie 2017-11-17 14:46:52 UTC
I don't think I will have more luck than you.

Comment 20 jamie 2018-05-31 19:58:00 UTC
Is there a better Java library I can use to make tray icons that work in Gnome and other systems(including Windows)?

Comment 21 jamie 2018-06-07 22:55:16 UTC
What is the status of this bug? Can we fix it?

Comment 22 Andrew John Hughes 2018-06-19 00:26:08 UTC
It sounds like the system tray is no more from GNOME 3.26 on:

"GNOME 3.26 no longer shows status icons in the bottom-left of the screen. This prevents the status icon tray from getting in the way and is expected to provide a better overall experience. The lack of status icons is not expected to cause serious issues for users. However, if you do find that you need to access them, they can be restored using the TopIcons extension."

https://help.gnome.org/misc/release-notes/3.26/
https://blogs.gnome.org/aday/2017/08/31/status-icons-and-gnome/

Comment 23 Andrew John Hughes 2018-06-19 00:54:53 UTC
I just tested the Oracle demo on Xfce with both OpenJDK 7 & 8 and it works fine there. It looks like the issues are due to GNOME.

Comment 24 jamie 2018-06-19 01:42:46 UTC
I am writing a Java program with the tray icon and can also confirm it works on XFCE but not Gnome.

Comment 25 Ben Cotton 2018-11-27 15:08:32 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 26 Robert Hancock 2018-11-28 03:08:05 UTC
This is still an issue in F29. With no GNOME Shell icons extensions, Java detects that the system tray is unsupported. However, if an extension like TopIcons Plus is used, it creates an icon, but it is still broken as described in the original report, although other native apps are able to have functional tray icons.

Comment 27 jamie 2018-12-02 03:09:41 UTC
Thanks for testing this in Fedora 29. So has anyone found a workaround for Java developers?

Comment 28 jamie 2018-12-02 03:44:05 UTC
I can't verify if this happens on Fedora 28.(can't get it to run for me at the moment) 

More info about my Gnome-Shell issue: https://forums.fedoraforum.org/showthread.php?320049-Can-t-run-Gnome-Shell-after-upgrading-to-Fedora-28

Comment 29 jamie 2018-12-02 19:22:31 UTC
Also happens in Fedora 28.

Comment 30 Ben Cotton 2019-10-31 19:38:50 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 31 Robert Hancock 2019-11-02 03:07:51 UTC
Looks like this is still an issue in Fedora 31. Without the TopIcons Plus extension, the app gets an exception indicating the system tray isn't supported (which I guess is partly OK), but with TopIcons installed, although there's no exception, no tray icon is displayed.

Comment 32 jamie 2020-05-17 18:21:53 UTC
I confirm this happens FC31

Comment 33 Ben Cotton 2020-11-03 14:56:40 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 34 Robert Hancock 2020-11-04 01:21:50 UTC
This seems to be fixed in Fedora 33 and OpenJDK 11 with the TopIcons Plus extension active - the tray icon appears to work properly now.


Note You need to log in before you can comment on or make changes to this bug.