ShellAppSystem: handle desktop files with capital letters
This is needed to handle applications that are converted to reverse dns notation, if their application ID includes capital letters (as it is often the case for DBus names) https://bugzilla.gnome.org/show_bug.cgi?id=706252
This commit is contained in:
parent
339a2f4a6f
commit
2acd23b14c
@ -559,6 +559,20 @@ shell_app_system_lookup_desktop_wmclass (ShellAppSystem *system,
|
||||
if (wmclass == NULL)
|
||||
return NULL;
|
||||
|
||||
/* First try without changing the case (this handles
|
||||
org.example.Foo.Bar.desktop applications)
|
||||
|
||||
Note that is slightly wrong in that Gtk+ would set
|
||||
the WM_CLASS to Org.example.Foo.Bar, but it also
|
||||
sets the instance part to org.example.Foo.Bar, so we're ok
|
||||
*/
|
||||
desktop_file = g_strconcat (wmclass, ".desktop", NULL);
|
||||
app = shell_app_system_lookup_heuristic_basename (system, desktop_file);
|
||||
g_free (desktop_file);
|
||||
|
||||
if (app)
|
||||
return app;
|
||||
|
||||
canonicalized = g_ascii_strdown (wmclass, -1);
|
||||
|
||||
/* This handles "Fedora Eclipse", probably others.
|
||||
|
Loading…
Reference in New Issue
Block a user