From e0d4540b46c5b7dd3d903f00ff1a391feed22f89 Mon Sep 17 00:00:00 2001 From: B Stack Date: Wed, 23 Oct 2019 21:44:49 -0400 Subject: WIP: add xfdesktop for el8 --- .../xfdesktop-4.10.3-backdrop-change-fix.patch | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 xfdesktop/xfdesktop-4.10.3-backdrop-change-fix.patch (limited to 'xfdesktop/xfdesktop-4.10.3-backdrop-change-fix.patch') diff --git a/xfdesktop/xfdesktop-4.10.3-backdrop-change-fix.patch b/xfdesktop/xfdesktop-4.10.3-backdrop-change-fix.patch new file mode 100644 index 0000000..068bde7 --- /dev/null +++ b/xfdesktop/xfdesktop-4.10.3-backdrop-change-fix.patch @@ -0,0 +1,52 @@ +diff -ur xfdesktop-4.10.3.org/common/xfdesktop-common.c xfdesktop-4.10.3/common/xfdesktop-common.c +--- xfdesktop-4.10.3.org/common/xfdesktop-common.c 2014-11-16 07:20:57.000000000 +0100 ++++ xfdesktop-4.10.3/common/xfdesktop-common.c 2014-12-11 08:58:23.511865532 +0100 +@@ -102,26 +102,38 @@ + items = 0; + files = g_strsplit(contents, "\n", -1); + ++ g_free(contents); /* not needed anymore */ ++ + /* Since the first line is the file identifier, we need to skip it. + * Additionally, we want to skip blank lines. */ +- for(i = 1; files[i] != NULL; i++) { +- if(g_strcmp0(files[i], "") != 0) { +- g_free(files[items]); +- files[items] = g_strdup(files[i]); +- DBG("files[items] %s", files[items]); +- items++; ++ ++ /* a file with just the header will have only one line */ ++ ++ if(files[0] != NULL) ++ { ++ g_free(files[0]); /* that's the only non-empty line we need to remove */ ++ files[0] = NULL; ++ for(i = 1; files[i] != NULL; i++) { ++ if(g_strcmp0(files[i], "") != 0) { ++ files[items]=files[i]; /* move the string to the current item slot */ ++ ++ items++; ++ } else { ++ g_free(files[i]); /* free the irrelevant empty string */ ++ } + } ++ files[items] = NULL; /* set the sentinel */ ++ ++ /* resize */ ++ ++ files = g_realloc(files, sizeof(gchar *) * (items+1)); + } +- files[items+1] = NULL; + +- files = g_realloc(files, sizeof(gchar *) * (items+1)); + + DBG("items %d", items); + if(n_items) + *n_items = items; + +- g_free(contents); +- + return files; + } + -- cgit