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 751541 - app-system: Improve StartupWMClass heuristics
app-system: Improve StartupWMClass heuristics
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-06-26 12:29 UTC by Florian Müllner
Modified: 2015-07-12 20:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
app-system: Improve StartupWMClass heuristics (1.95 KB, patch)
2015-06-26 12:29 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2015-06-26 12:29:42 UTC
See patch and https://bugzilla.redhat.com/show_bug.cgi?id=1234776 for the corresponding downstream bug.
Comment 1 Florian Müllner 2015-06-26 12:29:46 UTC
Created attachment 306171 [details] [review]
app-system: Improve StartupWMClass heuristics

Our StartUpWMClass heuristics use a StartupWMClass -> .desktop ID
mapping built from the list of all installed applications. In case
of multiple .desktop files setting the same StartupWMClass, we
currently simply pick the last one returned by g_app_info_get_all (),
which can be a bit surprising:
A window with WM_CLASS 'emacs', launched through a .desktop file
named 'emacs.desktop' with a StartupWMClass of 'emacs' maps to ...
'emacsclient.desktop'!
Make this case a bit less random by preferring the app info whose
ID matches the StartupWMClass.
Comment 2 Jasper St. Pierre (not reading bugmail) 2015-06-26 17:18:02 UTC
Review of attachment 306171 [details] [review]:

Yeah. I've noticed this bug before. This sounds like a good solution.
Comment 3 Florian Müllner 2015-06-26 17:22:20 UTC
Attachment 306171 [details] pushed as eac303f - app-system: Improve StartupWMClass heuristics