Hi Alex,

Do you have the following entry in the .desktop file of your application[1]:

StartupWMClass=com.foo.bar.FooApplication

-Abhinay

[1] https://github.com/gluonhq/scenebuilder/pull/407
________________________________
From: openjfx-dev <openjfx-dev-r...@openjdk.java.net> on behalf of Alex Orlov 
<ooo_satu...@mail.ru>
Sent: Thursday, May 26, 2022 10:50 PM
To: openjfx-dev <openjfx-dev@openjdk.java.net>
Subject: How to set WM_CLASS for GNOME?


Hello,

I develop a JavaFX application for Linux. And on my Ubuntu 20 I have a problem. 
I do `stage.setTitle("Foo");` and
I have a window with title `Foo`, but in Ubuntu top bar I see the name of the 
class `com.foo.bar.FooApplication`.

As I understand I should set correctly WM_CLASS. The only solution I found is 
this one
https://stackoverflow.com/a/54467323/5057736

However, I work in JPMS and I can’t access com.sun.glass.ui.Application. Could 
anyone say how I can make my
JavaFx application show "Foo" instead of class name in Ubuntu top bar?

--
Best regards, Alex Orlov

Reply via email to