rpms/gnome-settings-daemon/F-12 left-handed-single-button.patch, NONE, 1.1 gnome-settings-daemon.spec, 1.139, 1.140
Peter Hutterer
whot at fedoraproject.org
Mon Jan 18 23:42:35 UTC 2010
Author: whot
Update of /cvs/pkgs/rpms/gnome-settings-daemon/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1664
Modified Files:
gnome-settings-daemon.spec
Added Files:
left-handed-single-button.patch
Log Message:
* Mon Jan 18 2010 Peter Hutterer <peter.hutterer at redhat.com> 2.28.1-12
- left-handed-single-button.patch: Don't allow left-handed setting for
single-button touchpads. (related #548978)
left-handed-single-button.patch:
gsd-mouse-manager.c | 37 +++++++++++++++++++++++++++++++++++--
1 file changed, 35 insertions(+), 2 deletions(-)
--- NEW FILE left-handed-single-button.patch ---
>From 4687c5f8033ae41868f3d4507bf21d66e0916835 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer at who-t.net>
Date: Wed, 13 Jan 2010 10:48:30 +1000
Subject: [PATCH] Don't allow left-handed setting for single-button touchpads.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
plugins/mouse/gsd-mouse-manager.c | 36 +++++++++++++++++++++++++++++++++++-
1 files changed, 35 insertions(+), 1 deletions(-)
diff --git a/plugins/mouse/gsd-mouse-manager.c b/plugins/mouse/gsd-mouse-manager.c
index bc83a0f..ecccd7c 100644
--- a/plugins/mouse/gsd-mouse-manager.c
+++ b/plugins/mouse/gsd-mouse-manager.c
@@ -261,6 +261,36 @@ xinput_device_has_buttons (XDeviceInfo *device_info)
return FALSE;
}
+static gboolean
+touchpad_has_single_button(XDevice *device)
+{
+ Atom type, prop;
+ int format;
+ unsigned long nitems, bytes_after;
+ unsigned char *data;
+ gboolean is_single_button = FALSE;
+ int rc;
+
+ prop = XInternAtom (GDK_DISPLAY (), "Synaptics Capabilities", False);
+ if (!prop)
+ return FALSE;
+
+ gdk_error_trap_push ();
+ rc = XGetDeviceProperty (GDK_DISPLAY (), device, prop, 0, 1, False,
+ XA_INTEGER, &type, &format, &nitems,
+ &bytes_after, &data);
+ if (rc == Success && type == XA_INTEGER && format == 8 && nitems >= 3)
+ is_single_button = (data[0] == 1 && data[1] == 0 && data[2] == 0);
+
+ if (rc == Success)
+ XFree (data);
+
+ gdk_error_trap_pop ();
+
+ return is_single_button;
+}
+
+
static void
set_xinput_devices_left_handed (gboolean left_handed)
{
@@ -292,11 +322,15 @@ set_xinput_devices_left_handed (gboolean left_handed)
if (device != NULL) {
GConfClient *client = gconf_client_get_default ();
gboolean tap = gconf_client_get_bool (client, KEY_TAP_TO_CLICK, NULL);
+ gboolean single_button = touchpad_has_single_button (device);
- if (tap)
+ if (tap && !single_button)
set_tap_to_click (tap, left_handed);
XCloseDevice (GDK_DISPLAY (), device);
g_object_unref (client);
+
+ if (single_button)
+ continue;
}
gdk_error_trap_push ();
--
1.6.6
Index: gnome-settings-daemon.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-settings-daemon/F-12/gnome-settings-daemon.spec,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -p -r1.139 -r1.140
--- gnome-settings-daemon.spec 13 Jan 2010 00:38:07 -0000 1.139
+++ gnome-settings-daemon.spec 18 Jan 2010 23:42:34 -0000 1.140
@@ -1,6 +1,6 @@
Name: gnome-settings-daemon
Version: 2.28.1
-Release: 11%{?dist}
+Release: 12%{?dist}
Summary: The daemon sharing settings from GNOME to GTK+/KDE applications
Group: System Environment/Daemons
@@ -53,6 +53,10 @@ Patch8: survive-xmm.patch
# https://bugzilla.gnome.org/show_bug.cgi?id=604918
Patch9: osd-spam.patch
+# related 548978
+# https://bugzilla.gnome.org/show_bug.cgi?id=606794
+Patch10: left-handed-single-button.patch
+
%description
A daemon to share settings from GNOME to other applications. It also
handles global keybindings, as well as a number of desktop-wide settings.
@@ -80,6 +84,7 @@ developing applications that use %{name}
%patch7 -p1 -b .iconleak
%patch8 -p1 -b .survive-xmm
%patch9 -p1 -b .osd-spam
+%patch10 -p1 -b .single-button
%build
%configure --enable-static=no --enable-profiling --disable-esd
@@ -191,6 +196,10 @@ fi
%{_libdir}/pkgconfig/gnome-settings-daemon.pc
%changelog
+* Mon Jan 18 2010 Peter Hutterer <peter.hutterer at redhat.com> 2.28.1-12
+- left-handed-single-button.patch: Don't allow left-handed setting for
+ single-button touchpads. (related #548978)
+
* Wed Jan 13 2010 Peter Hutterer <peter.hutterer at redhat.com> 2.28.1-11
- Plug memory leak in left-handed-touchpad.patch
More information about the scm-commits
mailing list