- Don't set touchpads to be left-handed, otherwise the tap behaves like the
2nd mouse button (#483639)
This commit is contained in:
parent
ac4deb152c
commit
d42bf90576
@ -1,28 +0,0 @@
|
||||
===========================================================
|
||||
Ignore touchpads when swapping buttons
|
||||
|
||||
We always want clicks on the touchpad
|
||||
to be left click (bug 324721)
|
||||
|
||||
diff --git a/plugins/mouse/gsd-mouse-manager.c b/plugins/mouse/gsd-mouse-manager.c
|
||||
--- a/plugins/mouse/gsd-mouse-manager.c
|
||||
+++ b/plugins/mouse/gsd-mouse-manager.c
|
||||
@@ -233,6 +233,11 @@ xinput_device_has_buttons (XDeviceInfo *device_info)
|
||||
int i;
|
||||
XAnyClassInfo *class_info;
|
||||
|
||||
+ if (device_info->type == gdk_x11_get_xatom_by_name (XI_TABLET) ||
|
||||
+ device_info->type == gdk_x11_get_xatom_by_name (XI_TOUCHSCREEN) ||
|
||||
+ device_info->type == gdk_x11_get_xatom_by_name (XI_TOUCHPAD))
|
||||
+ return FALSE;
|
||||
+
|
||||
class_info = device_info->inputclassinfo;
|
||||
for (i = 0; i < device_info->num_classes; i++) {
|
||||
if (class_info->class == ButtonClass) {
|
||||
@@ -356,6 +361,7 @@
|
||||
#ifdef HAVE_X11_EXTENSIONS_XINPUT_H
|
||||
if (supports_xinput_devices ()) {
|
||||
set_xinput_devices_left_handed (left_handed);
|
||||
+ return;
|
||||
}
|
||||
#endif
|
42
gnome-settings-daemon-2.26.1-fix-touchpad.patch
Normal file
42
gnome-settings-daemon-2.26.1-fix-touchpad.patch
Normal file
@ -0,0 +1,42 @@
|
||||
--- 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
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: gnome-settings-daemon
|
||||
Version: 2.26.1
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: The daemon sharing settings from GNOME to GTK+/KDE applications
|
||||
|
||||
Group: System Environment/Daemons
|
||||
@ -38,6 +38,9 @@ Patch10: gnome-settings-daemon-2.24.0-catch-deviceadded.patch
|
||||
# http://bugzilla.gnome.org/show_bug.cgi?id=578444
|
||||
Patch11: gnome-settings-daemon-2.26.0-support-touchpads.patch
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=483639
|
||||
Patch12: gnome-settings-daemon-2.26.1-fix-touchpad.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.
|
||||
@ -58,6 +61,7 @@ developing applications that use %{name}.
|
||||
|
||||
%patch10 -p1 -b .catch-deviceadded
|
||||
%patch11 -p1 -b .support-touchpads
|
||||
%patch12 -p1 -b .lefthand-touchpad
|
||||
|
||||
autoreconf -i -f
|
||||
|
||||
@ -170,6 +174,10 @@ fi
|
||||
%{_libdir}/pkgconfig/gnome-settings-daemon.pc
|
||||
|
||||
%changelog
|
||||
* Wed Apr 29 2009 Bastien Nocera <bnocera@redhat.com> 2.26.1-3
|
||||
- Don't set touchpads to be left-handed, otherwise the tap
|
||||
behaves like the 2nd mouse button (#483639)
|
||||
|
||||
* Mon Apr 27 2009 Matthias Clasen <mclasen@redhat.com> - 2.26.1-2
|
||||
- Don't drop schemas translations from po files
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user