rpms/xfce-mcs-plugins/F-8 xfce-mcs-plugins-4.4.2-mouse.patch, NONE, 1.1 xfce-mcs-plugins.spec, 1.17, 1.18

Kevin Fenzi (kevin) fedora-extras-commits at redhat.com
Wed Dec 19 03:10:23 UTC 2007


Author: kevin

Update of /cvs/extras/rpms/xfce-mcs-plugins/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15743

Modified Files:
	xfce-mcs-plugins.spec 
Added Files:
	xfce-mcs-plugins-4.4.2-mouse.patch 
Log Message:
Add patch for mouse button crash (fixes #425925)


xfce-mcs-plugins-4.4.2-mouse.patch:

--- NEW FILE xfce-mcs-plugins-4.4.2-mouse.patch ---
diff -Nur xfce-mcs-plugins-4.4.2.orig/plugins/mouse_plugin/mouse_plugin.c xfce-mcs-plugins-4.4.2/plugins/mouse_plugin/mouse_plugin.c
--- xfce-mcs-plugins-4.4.2.orig/plugins/mouse_plugin/mouse_plugin.c	2007-11-17 12:31:23.000000000 -0700
+++ xfce-mcs-plugins-4.4.2/plugins/mouse_plugin/mouse_plugin.c	2007-12-17 17:51:03.000000000 -0700
@@ -174,7 +174,7 @@
     unsigned char *buttons;
     gint n_buttons, n_devices, i;
     gint idx_1 = 0, idx_3 = 1;
-    gsize buttons_capacity = 16;
+    gsize buttons_capacity = DEFAULT_PTR_MAP_SIZE;
 
     device_info = XListInputDevices (GDK_DISPLAY (), &n_devices);
 
@@ -204,11 +204,12 @@
             continue;
         }
 
-        n_buttons = XGetDeviceButtonMapping (GDK_DISPLAY (), device, buttons, DEFAULT_PTR_MAP_SIZE);
-        if (n_buttons > DEFAULT_PTR_MAP_SIZE)
+	n_buttons = XGetDeviceButtonMapping (GDK_DISPLAY (), device, buttons, buttons_capacity);
+	if (n_buttons > buttons_capacity)
         {
-            buttons = g_alloca (n_buttons);
-            n_buttons = XGetDeviceButtonMapping (GDK_DISPLAY (), device, buttons, n_buttons);
+		buttons = g_realloc (buttons, n_buttons);
+		buttons_capacity = n_buttons;
+		n_buttons = XGetDeviceButtonMapping (GDK_DISPLAY (), device, buttons, buttons_capacity);
         }
 
         for (i = 0; i < n_buttons; i++)


Index: xfce-mcs-plugins.spec
===================================================================
RCS file: /cvs/extras/rpms/xfce-mcs-plugins/F-8/xfce-mcs-plugins.spec,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- xfce-mcs-plugins.spec	7 Dec 2007 03:36:37 -0000	1.17
+++ xfce-mcs-plugins.spec	19 Dec 2007 03:09:42 -0000	1.18
@@ -1,11 +1,12 @@
 Summary: Plugins for multi channel settings manager
 Name: xfce-mcs-plugins
 Version: 4.4.2
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2
 URL: http://www.xfce.org/
 Source0: http://www.xfce.org/archive/xfce-4.4.2/src/xfce-mcs-plugins-4.4.2.tar.bz2
 Patch: xfce-mcs-plugins-4.4.2-fedora.patch
+Patch1: xfce-mcs-plugins-4.4.2-mouse.patch
 Group: User Interface/Desktops
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 Requires: xfce-mcs-manager >= %{version}
@@ -25,6 +26,7 @@
 %prep
 %setup -q
 %patch -p1 -b .theme
+%patch1 -p1 -b .mouse
 
 %build
 %configure
@@ -54,6 +56,9 @@
 %{_datadir}/icons/*/*/apps/*
 
 %changelog
+* Mon Dec 17 2007 Kevin Fenzi <kevin at tummy.com> - 4.4.2-2
+- Add patch for mouse button crash (fixes #425925)
+
 * Sun Nov 18 2007 Kevin Fenzi <kevin at tummy.com> - 4.4.2-1
 - Update to 4.4.2
 




More information about the fedora-extras-commits mailing list