summaryrefslogtreecommitdiff
path: root/pcr/bamf/fix-current-desktop.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/bamf/fix-current-desktop.patch')
-rw-r--r--pcr/bamf/fix-current-desktop.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/pcr/bamf/fix-current-desktop.patch b/pcr/bamf/fix-current-desktop.patch
new file mode 100644
index 000000000..c4837c6ec
--- /dev/null
+++ b/pcr/bamf/fix-current-desktop.patch
@@ -0,0 +1,31 @@
+diff -Naur bamf-0.3.4.orig/src/bamf-matcher.c bamf-0.3.4/src/bamf-matcher.c
+--- bamf-0.3.4.orig/src/bamf-matcher.c 2012-10-11 09:40:29.122317000 +0200
++++ bamf-0.3.4/src/bamf-matcher.c 2012-12-04 04:44:07.236990092 +0100
+@@ -827,6 +827,7 @@
+ GHashTable *desktop_class_table)
+ {
+ GDesktopAppInfo *desktop_file;
++ const char *current_desktop;
+ char *exec;
+ char *path;
+ GString *desktop_id; /* is ok... really */
+@@ -840,7 +841,9 @@
+ return;
+ }
+
+- if (!g_desktop_app_info_get_show_in (desktop_file, g_getenv ("XDG_CURRENT_DESKTOP")))
++ current_desktop = g_getenv ("XDG_CURRENT_DESKTOP");
++
++ if (current_desktop && !g_desktop_app_info_get_show_in (desktop_file, current_desktop))
+ {
+ g_object_unref (desktop_file);
+ return;
+@@ -848,7 +851,7 @@
+
+ exec = g_strdup (g_app_info_get_commandline (G_APP_INFO (desktop_file)));
+
+- if (!exec)
++ if (!exec || exec[0] == '\0')
+ {
+ g_object_unref (desktop_file);
+ return;