-
Notifications
You must be signed in to change notification settings - Fork 58
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
2.1: [BUG] Not working with both GTK3 and JavaFX #14
Comments
Hm, I have some ideas on how to do that. |
Ideas for fix, or ideas for option for disabling use of GTK3? : ] |
I found that
|
For forcing the version of GTK to try. What happens if you set |
Same message as above + So still not better 😞 |
|
Hm. SWT likely already loads GTK2 - Let me think about detecting if GTK2 is already loaded |
But I'm not loading SWT on Linux. I tried using it in the past, but same error occurred, so I resigned. |
So you're getting this error on Linux? (ubuntu 15.10?) |
Just add the option for disabling detection of GTK3 and it will be fine.
Yes. |
Ok, if I remove JavaFX from test app (new library with GTK3 support), then that errors are not shown. But icon in tray is also not visible. |
Is it loading the AppIndicator library? |
Sorry, my bad - everything works in that case. |
So the problem arise when using both GTK3 and JavaFX. |
Ahh, it's a JavaFX thing? |
That makes a LOT more sense, because I can detect if JavaFX is in use and switch to GTK2 (there will be warnings if libappindicator1 is not present though). I'll still add an GTK version override though |
I think that JavaFX loads some GTK libraries and it's causing that problems.
Thanks 😄 |
As a side note, in the past I tried to force using GTK2 by SWT, but that then caused problems with JavaFX 😠 But your library in version |
I'm guessing now that SWT (GTK2), JavaFX (GTK2), and SystemTray (GTK2/GTK3) -- and they all hate each other. I think I'll change out the event_loop i use, so that will always run (SWT fixed issues they had with nested event loops, which is why i could remove the SWT detection), but it seems that my event loop should always run. |
(that might be a confusing comment...) |
Currently, I'm loading SWT conditionally, only on Windows. But in that case, I'm not loading your library - I use it only on Linux. So forget about SWT 😉 This was only the example of similar error messages. (but I still have test program that I can run on Windows, so I could report issue #13 ) I confirmed that JavaFX uses, and will be using, GTK2. So, if your library is trying to load GTK3, then we see that problems... |
Yea, i'm going to leave out auto-detection, since that is just too tricky. It will just be a boolean you set on startup. |
🆗 |
:) yea, i will - just uploaded 2.2 to maven + github, can you try that out? |
I tried using version
and then, depending on app and/or that if I started SystemTray before or after starnig JavaFX, gives me that results:
Reversing order of calling |
I actually found a type leftover from when I was testing -- which might be why it's working now. Shutdown should work -- i'll investigate |
Ah, so you accidentally hardcoded use of GTK2 - I see 😃 Shutdown worked correctly in |
wow. i just noticed that I didn't use Try version 2.6 (i just uploaded it to maven + git) |
At first glance -- it appears that when I shutdown GTK, that also shutsdown the same GTK that JavaFX uses. What might be possible (I'll check with this later), is that there is another boolean that affects the shutdown procedure. I'm not sure the best way to approach this... |
Because either I shutdown GTK or javaFX shutsdown GTK -- we end up in a |
That's excepted behaviour - in JavaFX, by default, closing last window shutdown entire app.
I suggest to not adding another boolean, but instead renaming current boolean to something like |
Give
I also added a If JavaFX main window is closed, the SystemTray will also close. This is necessary since JavaFX kills GTK and it will hang (as previously observed). |
What are the new changes in |
Also - I've been testing |
A lot of builds are going, trying to get SWT working... Out of curiosity - do you use the SWT systemtray, when you're using SWT? |
Ok, so I can just update to newest-newest version then 😉
Yes, but only system tray component, and only on Windows, when I don't use your library (it still currently does not works on windows anyway, heh). So I don't care about possible incompatibilities. |
Yea :)
I'll get on that right now, since the idea is for SystemTray to work on everything. |
Alright,
|
Arrgh - i test it (it works), push the build to maven and test again in my main app and ... it doesn't work. |
I'm satisfied with |
@dorkbox This AGAIN no longer works on Ubuntu 16.04 |
Awesome!! :( I'll look into it. Sadly, not right away as I'm in the middle of an executable launcher (replacement for java.exe) and context switching is expensive. |
Ok. I plan to create example test project using TestFX to catch that type of problems earlier in the future. |
Good idea. |
I should probably list a compatibility matrix that this has been tested on. |
Minimal not working example: |
Just ran some tests in a VM -- it looks like the "normal" (non javaFX) version is working, and I verified that the javaFX version is not. |
Got it working in Gnome 3.20+ (but not if gnome-shell is installed on-top of Unity... that just doesn't work at all, but UbuntuGnome works just fine). |
Still problems with JavaFX (GTK2) on Ubuntu 16.04 (GTK3) -- working those kinks out... |
So it looks like GTK2 on Ubuntu 16.04 is broken in some weird way. GTK2 on xubuntu 16.04 works just fine, GTK3 on Ubuntu/Xubunutu 16.04 works fine -- just GTK2 has issues. This would be why javaFX doesn't work correctly (it uses GTK2). Edit: Cannonical removed the "application status" indicator panel, so the fallback GtkStatusIcon does not work. Since JavaFX only works with GTK2 (Java9 provides GTK3 bindings), and Cannonical removed GTK2 AppIndicator support, |
Master branch has the latest -- i haven't pushed a build yet, but I think it's ready, and it will likely be tomorrow that I push the build. |
There were some scaling issues with the tray/menu icons. Those issues are getting fixed, and it shouldn't be much longer before I'll have something for testing (it will be downloadable "all-in-one-jars" from my server). If those pass, then I'll push a release. |
3.0 beta is released as a "all-in-one" jar, for a variety of different tray types and configurations. I'm starting a new issue to track the progress for this. I definitely will need help testing in different Linux/Mac/Windows configurations (ie: I have no idea if this works in Windows 10, or the latest MacOsX) I'm closing this issue and tracking everything in a new one. Please use Issue #22 for all related feedback, problems, etc. |
After adding support for GTK3, I have same bug on startup as when using SWT:
I don't know I you can fix this, so please add option for disabling support for GTK3.
The text was updated successfully, but these errors were encountered: