From 7431396463195af57f1bb9a7375dff7e0f4f9033 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 9 Sep 2009 11:02:31 +0000 Subject: [PATCH] - Update left-hand touchpad patch --- ...94617-Touchpad-left-handed-bug-fixes.patch | 57 +++++++++++++++++++ ...-settings-daemon-2.26.1-fix-touchpad.patch | 42 -------------- gnome-settings-daemon.spec | 13 +++-- 3 files changed, 64 insertions(+), 48 deletions(-) create mode 100644 0001-Bug-594617-Touchpad-left-handed-bug-fixes.patch delete mode 100644 gnome-settings-daemon-2.26.1-fix-touchpad.patch diff --git a/0001-Bug-594617-Touchpad-left-handed-bug-fixes.patch b/0001-Bug-594617-Touchpad-left-handed-bug-fixes.patch new file mode 100644 index 0000000..6808fad --- /dev/null +++ b/0001-Bug-594617-Touchpad-left-handed-bug-fixes.patch @@ -0,0 +1,57 @@ +From b097ceeb19cee5f3e49311b8f03cf9463caea628 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Wed, 9 Sep 2009 11:59:21 +0100 +Subject: [PATCH] =?utf-8?q?Bug=C2=A0594617=20-=20Touchpad=20left-handed=20bug=20fixes?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 8bit + +1) Don't swap mouse buttons for left-handers on the touchpad (otherwise +a tap would be a right-click) +2) If XInput is supported, don't switch the core pointer to left-handed, +as it would cancel our other settings +--- + plugins/mouse/gsd-mouse-manager.c | 12 ++++++++++++ + 1 files changed, 12 insertions(+), 0 deletions(-) + +diff --git a/plugins/mouse/gsd-mouse-manager.c b/plugins/mouse/gsd-mouse-manager.c +index b5c96a1..e09d38c 100644 +--- a/plugins/mouse/gsd-mouse-manager.c ++++ b/plugins/mouse/gsd-mouse-manager.c +@@ -84,6 +84,7 @@ static void gsd_mouse_manager_class_init (GsdMouseManagerClass *klass); + static void gsd_mouse_manager_init (GsdMouseManager *mouse_manager); + static void gsd_mouse_manager_finalize (GObject *object); + static void set_mouse_settings (GsdMouseManager *manager); ++static XDevice* device_is_touchpad (XDeviceInfo deviceinfo); + + G_DEFINE_TYPE (GsdMouseManager, gsd_mouse_manager, G_TYPE_OBJECT) + +@@ -284,6 +285,14 @@ set_xinput_devices_left_handed (gboolean left_handed) + (!xinput_device_has_buttons (&device_info[i]))) + continue; + ++ /* If the device is a touchpad, don't swap buttons ++ * around */ ++ device = device_is_touchpad (device_info[i]); ++ if (device != NULL) { ++ XCloseDevice (GDK_DISPLAY (), device); ++ continue; ++ } ++ + gdk_error_trap_push (); + + device = XOpenDevice (GDK_DISPLAY (), device_info[i].id); +@@ -371,7 +380,10 @@ set_left_handed (GsdMouseManager *manager, + + #ifdef HAVE_X11_EXTENSIONS_XINPUT_H + if (supports_xinput_devices ()) { ++ /* When XInput support is available, never set the ++ * button ordering on the core pointer */ + set_xinput_devices_left_handed (left_handed); ++ return; + } + #endif + +-- +1.6.2.5 + diff --git a/gnome-settings-daemon-2.26.1-fix-touchpad.patch b/gnome-settings-daemon-2.26.1-fix-touchpad.patch deleted file mode 100644 index 59806a0..0000000 --- a/gnome-settings-daemon-2.26.1-fix-touchpad.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- gnome-settings-daemon-2.26.1/plugins/mouse/gsd-mouse-manager.c.old 2009-04-29 14:32:27.000000000 +0100 -+++ gnome-settings-daemon-2.26.1/plugins/mouse/gsd-mouse-manager.c 2009-04-29 15:44:55.000000000 +0100 -@@ -84,6 +84,7 @@ static void gsd_mouse_manager_class_ - static void gsd_mouse_manager_init (GsdMouseManager *mouse_manager); - static void gsd_mouse_manager_finalize (GObject *object); - static void set_mouse_settings (GsdMouseManager *manager); -+static XDevice* device_is_touchpad (XDeviceInfo deviceinfo); - - G_DEFINE_TYPE (GsdMouseManager, gsd_mouse_manager, G_TYPE_OBJECT) - -@@ -282,10 +283,18 @@ set_xinput_devices_left_handed (gboolean - for (i = 0; i < n_devices; i++) { - XDevice *device = NULL; - -- if ((device_info[i].use != IsXExtensionDevice) || -+ if ((device_info[i].use != IsXExtensionPointer) || - (!xinput_device_has_buttons (&device_info[i]))) - continue; - -+ /* If the device is a touchpad, don't swap buttons -+ * around */ -+ device = device_is_touchpad (device_info[i]); -+ if (device != NULL) { -+ XCloseDevice (GDK_DISPLAY (), device); -+ continue; -+ } -+ - gdk_error_trap_push (); - - device = XOpenDevice (GDK_DISPLAY (), device_info[i].id); -@@ -372,8 +381,11 @@ set_left_handed (GsdMouseManager *manage - gint n_buttons, i; - - #ifdef HAVE_X11_EXTENSIONS_XINPUT_H -+ /* When XInput support is available, never set the -+ * button ordering on the core pointer */ - if (supports_xinput_devices ()) { - set_xinput_devices_left_handed (left_handed); -+ return; - } - #endif - diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index 5840f4d..1835e67 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -1,6 +1,6 @@ Name: gnome-settings-daemon Version: 2.27.92 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications Group: System Environment/Daemons @@ -29,11 +29,11 @@ BuildRequires: pulseaudio-libs-devel BuildRequires: libgnomekbd-devel BuildRequires: libnotify-devel BuildRequires: gettext -BuildRequires: autoconf, automake, libtool, intltool BuildRequires: fontconfig-devel # https://bugzilla.redhat.com/show_bug.cgi?id=483639 -#Patch12: gnome-settings-daemon-2.26.1-fix-touchpad.patch +# http://bugzilla.gnome.org/show_bug.cgi?id=594617 +Patch1: 0001-Bug-594617-Touchpad-left-handed-bug-fixes.patch %description A daemon to share settings from GNOME to other applications. It also @@ -53,9 +53,7 @@ developing applications that use %{name}. %prep %setup -q -#%patch12 -p1 -b .lefthand-touchpad - -autoreconf -i -f +%patch1 -p1 -b .lefthand-touchpad %build %configure --enable-static=no --enable-profiling --disable-esd @@ -167,6 +165,9 @@ fi %{_libdir}/pkgconfig/gnome-settings-daemon.pc %changelog +* Wed Sep 09 2009 Bastien Nocera 2.27.92-2 +- Update left-hand touchpad patch + * Mon Sep 7 2009 Matthias Clasen - 2.27.92-1 - Update to 2.27.92