[mate-window-manager] Fix crash if you have lots of workspaces
leigh123linux
leigh123linux at fedoraproject.org
Wed Oct 17 16:09:38 UTC 2012
commit c6d83de49ac25441ac241d2498722fb035b9624e
Author: leigh123linux <leigh123linux at googlemail.com>
Date: Wed Oct 17 17:09:34 2012 +0100
Fix crash if you have lots of workspaces
initialise_all_workspace_names.patch | 33 +++++++++++++++++++++++++++++++++
mate-window-manager.spec | 8 +++++++-
2 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/initialise_all_workspace_names.patch b/initialise_all_workspace_names.patch
new file mode 100644
index 0000000..11823a2
--- /dev/null
+++ b/initialise_all_workspace_names.patch
@@ -0,0 +1,33 @@
+--- a/src/core/prefs.c
++++ b/src/core/prefs.c
+@@ -1962,6 +1962,10 @@ init_commands (void)
+ static void
+ init_workspace_names (void)
+ {
++ int i;
++ for (i = 0; i < MAX_REASONABLE_WORKSPACES; i++)
++ workspace_names[i] = NULL;
++
+ #ifdef HAVE_MATECONF
+ GSList *list, *l;
+ const char *str_val;
+@@ -1980,14 +1984,15 @@ init_workspace_names (void)
+ mateconf_entry_free (entry);
+ }
+ g_slist_free (list);
+-#else
+- int i;
++#endif /* HAVE_MATECONF */
++
++ /* initialise any we didn't see */
+ for (i = 0; i < MAX_REASONABLE_WORKSPACES; i++)
+- workspace_names[i] = g_strdup_printf (_("Workspace %d"), i + 1);
++ if (workspace_names[i]==NULL)
++ workspace_names[i] = g_strdup_printf (_("Workspace %d"), i + 1);
+
+ meta_topic (META_DEBUG_PREFS,
+ "Initialized workspace names\n");
+-#endif /* HAVE_MATECONF */
+ }
+
+ static gboolean
diff --git a/mate-window-manager.spec b/mate-window-manager.spec
index fe88783..be7c2cb 100644
--- a/mate-window-manager.spec
+++ b/mate-window-manager.spec
@@ -6,7 +6,7 @@
Name: mate-window-manager
Version: 1.4.1
-Release: 11%{?dist}
+Release: 12%{?dist}
Summary: MATE Desktop window manager
License: LGPLv2+ and GPLv2+
URL: http://mate-desktop.org
@@ -14,6 +14,8 @@ URL: http://mate-desktop.org
Source0: http://vicodan.fedorapeople.org/mate-window-manager-1.4.1-GIT.tar.gz
# https://bugzilla.gnome.org/show_bug.cgi?id=622517
Patch0: Allow-breaking-out-from-maximization-during-mouse.patch
+# https://bugs.launchpad.net/ubuntu/+source/metacity/+bug/583847
+Patch1: initialise_all_workspace_names.patch
BuildRequires: desktop-file-utils
BuildRequires: gtk2-devel
@@ -52,6 +54,7 @@ Development files for mate-window-manager
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
NOCONFIGURE=1 ./autogen.sh
@@ -137,6 +140,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/marco.desktop
%changelog
+* Wed Oct 17 2012 Leigh Scott <leigh123linux at googlemail.com> - 1.4.1-12
+- Fix crash if you have lots of workspaces
+
* Tue Oct 16 2012 Leigh Scott <leigh123linux at googlemail.com> - 1.4.1-11
- filter provides
- fix build requires
More information about the scm-commits
mailing list