try harder to get the exec name for flatpaks

so gnome-shell's application search does not
show zero result for an application that is
installed both by distro package and by flatpak.

Fixes issue gnome-shell#1013
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index 7d7425e..946f45e 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -1099,6 +1099,18 @@
                   /* Special handling: only match basename of first field */
                   gchar *space;
                   gchar *slash;
+                  gchar *tmp;
+
+                  /* For 'flatpak run' case, use --command if present. see gnome-shell#1013 */
+                  if ((tmp = g_strstr_len (raw, -1, "flatpak run")) &&
+                      (tmp = g_strstr_len (tmp, -1, "--command=")))
+                    {
+                      tmp = g_strdup (tmp + strlen("--command="));
+                      g_free (raw);
+                      raw = tmp;
+                      tmp = NULL;
+                      value = raw;
+                    }
 
                   /* Remove extra arguments, if any */
                   space = raw + strcspn (raw, " \t\n"); /* IFS */