Fix bug where apps are mapped to the wrong .desktop file and icon
Fixes #18 (closed). Now VS Code, Sublime Text, and Wine apps with .desktop files and StartupWMClass
set are mapped properly, show the right icon, can be pinned, etc.
Unresolved cases
Wine apps without an associated .desktop file are still broken. They show a generic app icon rather than the window's icon, cause docklike to print docklike-Message: 22:50:28.615: NO MATCH: winecfg.exe
, and do not group. The app icon could be fixed by reading from _NET_WM_ICON
, but I'm unsure how to fix grouping (maybe construct a synthetic category based on matching WM_CLASS
without an associated .desktop file?). In any case it's an invasive change.
This MR causes less apps to resort to g_desktop_app_info_search
, but does not fix the nondeterministic result for apps which still rely on it to find a .desktop file. (I don't know which apps rely on g_desktop_app_info_search
and have multiple matches, though.)