GNOME Bugzilla – Bug 751541
app-system: Improve StartupWMClass heuristics
Last modified: 2015-07-12 20:12:23 UTC
See patch and https://bugzilla.redhat.com/show_bug.cgi?id=1234776 for the corresponding downstream bug.
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.
Review of attachment 306171 [details] [review]: Yeah. I've noticed this bug before. This sounds like a good solution.
Attachment 306171 [details] pushed as eac303f - app-system: Improve StartupWMClass heuristics