gnome-settings-daemon/buttonmapping.patch
2009-08-26 04:33:47 +00:00

35 lines
1.3 KiB
Diff

From 77e4a88e1a4abd72f036eb6fda208cb36faff162 Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed, 26 Aug 2009 09:48:06 +1000
Subject: [PATCH] Skip button mappings only for core devices.
Since server 1.4, devices are unlikely to be marked as IsXExtensionPointer.
More common is IsXExtensionKeyboard or IsXExtensionPointer.
However, with many pointer devices also having keys (e.g. most wireless
combos) a check for IsXExtensionPointer is unreliable.
In gsd-mouse-manager, skip the XInput button mapping only if the device is a
core device. Otherwise, test for buttons.
---
plugins/mouse/gsd-mouse-manager.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/plugins/mouse/gsd-mouse-manager.c b/plugins/mouse/gsd-mouse-manager.c
index 30e649d..7fae963 100644
--- a/plugins/mouse/gsd-mouse-manager.c
+++ b/plugins/mouse/gsd-mouse-manager.c
@@ -283,7 +283,8 @@ set_xinput_devices_left_handed (gboolean left_handed)
for (i = 0; i < n_devices; i++) {
XDevice *device = NULL;
- if ((device_info[i].use != IsXExtensionPointer) ||
+ if ((device_info[i].use == IsXPointer) ||
+ (device_info[i].use == IsXKeyboard) ||
(!xinput_device_has_buttons (&device_info[i])))
continue;
--
1.6.3.rc1.2.g0164.dirty