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

[desktop] Tray icon problem (Linux (KDE)). #845

Open
Tracked by #999
Achaean opened this issue Aug 5, 2019 · 11 comments
Open
Tracked by #999

[desktop] Tray icon problem (Linux (KDE)). #845

Achaean opened this issue Aug 5, 2019 · 11 comments

Comments

@Achaean
Copy link

Achaean commented Aug 5, 2019

Hi! :-)

I'm on Devuan ASCII (stable) x64 KDE (based on Debian oldstable at the time).
I tried both the standalone Linux Frostwite and the DEB installer of the last stable version (6.8.1.b285).
Java from Backports:

java -version
openjdk version "11.0.4" 2019-07-16
OpenJDK Runtime Environment (build 11.0.4+11-post-Debian-1bpo91)
OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Debian-1bpo91, mixed mode, sharing)

It works great here, but it has a problem with it's tray icon.
(I'm speaking for the KDE desktop).

Trayicon is visible, but not functional. Neither right, nor left click do something.
It just brings up the description "JavaEmbeddedFrame".
Seems to me that its a failure to create menu, so I tried installing libjna and libappindicator, but they didn't help.

Bye! :-)

@gubatron
Copy link
Collaborator

gubatron commented Aug 7, 2019

Thank you for bringing this to our attention.

Will have to get KDE (which I love), it's been such a long time for me, hopefully will be able to fix quickly. Thanks for pointing out your libjna and libappindicator attempts.

@gubatron
Copy link
Collaborator

gubatron commented Aug 7, 2019

In case anybody wants to start taking a look, this is the code.

https://github.com/frostwire/frostwire/blob/master/desktop/src/com/limegroup/gnutella/gui/notify/TrayNotifier.java

I believe it uses AWT's TrayIcon
https://docs.oracle.com/javase/10/docs/api/java/awt/TrayIcon.html

Will try to first replicate, and also see if it's working in Gnome, and then search on the internet for similar issues and solutions, hopefully there's some error output when clicking on it, if not I'll make sure to add try/catch handlers on the event handlers.

@gubatron
Copy link
Collaborator

gubatron commented Aug 7, 2019

maybe these button modifiers are obsolete or differently handled in KDE post Java10:

if ((e.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK) == MouseEvent.BUTTON1_DOWN_MASK) {

@Achaean
Copy link
Author

Achaean commented Aug 8, 2019

THANKS gubatron!!! ;-)

If the problem appears only at old Java versions, seems to me , that it is not of a big priority.
I mean, how many people are still stuck at oldstable? Chances are, that there are not a great number of them.

Meanwhile I installed some Java applications and seems to have the same issue. Probably a KDE issue. Only Bigly manages to handle properly the tray icon. Dunno haw they do it! :-(

@gubatron gubatron changed the title Tray icon problem (Linux (KDE)). [desktop] Tray icon problem (Linux (KDE)). Aug 24, 2019
@gubatron
Copy link
Collaborator

Been very slow on this one, but now I have KDE Plasma on my linux box so I'll probably spend some time having fun with this one, even if it takes coding the component from scratch in C++ so plasma users have the experience they deserve when they use FrostWire

@gubatron
Copy link
Collaborator

Screen Shot 2020-01-13 at 9 47 46 AM

it seems to be working somewhat better now, but we still see the "Java Embedded Frame" when you mouse over it. When I click on it, I do see the menu now.
Screen Shot 2020-01-13 at 9 46 31 AM
Screen Shot 2020-01-13 at 9 46 37 AM

@gubatron
Copy link
Collaborator

@Achaean

Only Bigly manages to handle properly the tray icon

is that a VPN app by any chance?

@Achaean
Copy link
Author

Achaean commented Jan 13, 2020

so plasma users have the experience they deserve

I'm wishing the best for KDE entity!
Personally, I'm fed up with all these bugs and poor user experience, and I'm searching for a replacement. Not to mention, that most of the developers, are not real computer programmers. They're mobile ones, instead. Most of KDE code nowadays, is a poor compilation from mobile code.
I'm a KDE user, for >15y. but...Oh well. I've had enough! :-)

Only Bigly manages to handle properly the tray icon

is that a VPN app by any chance?

No.. It looks like a frog, it behaves like a frog, it's.....Azureus! :-)
(Although it has technical problems nowadays.
https://www.biglybt.com/

@fahimanwer
Copy link

I am completely noob in development but I think that Flutter can be a good platform in near feature.

@gubatron
Copy link
Collaborator

gubatron commented Jan 14, 2020

that's right, Azureus forked.
They're open source, we probably still have some Azureus code inside FrostWire, it's how we transitioned from gnutella to bittorrent, but then we replaced azureus torrent engine for libtorrent.

Will check it out, parg is a java expert (I've learned a lot from his code), he def. would know how to go around it.

Thanks @Achaean

@gubatron
Copy link
Collaborator

we use Java swing, they use SWT, a UI toolkit that allows you to use the host systems's native UI components (now that I remember)

This is their systray code
https://github.com/BiglySoftware/BiglyBT/tree/master/uis/src/com/biglybt/ui/swt/systray

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

3 participants