After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 656017 - "Heuristics used to make the association between X windows and .desktop files" doesn't work for Java applications
"Heuristics used to make the association between X windows and .desktop files...
Status: RESOLVED DUPLICATE of bug 647437
Product: gnome-shell
Classification: Core
Component: general
3.0.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-08-05 09:09 UTC by Roman Shevchenko
Modified: 2011-08-05 15:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Roman Shevchenko 2011-08-05 09:09:35 UTC
(Quote in summary is from http://live.gnome.org/GnomeShell/ApplicationBased).

In Java application, only second WM_CLASS string can be more or less easily modified (usually it contains app's main class qualified name with dots replaced with dashes), and first string is always the same, e.g.:
WM_CLASS(STRING) = "sun-awt-X11-XFramePeer", "my-app-Main"

App's .desktop file contains "StartupWMClass=my-app-Main" but Gnome shell failed to associate window with application.
Comment 1 Rui Matos 2011-08-05 13:08:27 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 647437 ***
Comment 2 Roman Shevchenko 2011-08-05 13:37:14 UTC
Rui, I can't agree this bugis a duplicate. It is not about Java app incorrectly setting WM_CLASS - it's about Gnome's inability to match it to a corresponding StartupWMClass property in a .desktop file.

Or do I getting something wrong and StartupWMClass property is irrelevant to the matching algorithm? In this case could you please point me to it's actual description (or to a place in a source code where it is implemented)?(In reply to comment #1)
Comment 3 Rui Matos 2011-08-05 14:38:48 UTC
See Owen's comments in bug 647437. The .desktop file name must match WM_CLASS. 

See also the netbeans bug linked from there.
Comment 4 Roman Shevchenko 2011-08-05 15:37:52 UTC
Ok, got it (my app had vendor prefix in .desktop but missed it in WM_CLASS).
Thank you.