[gnome-settings-daemon] mouse: skip button mappings only for core devices.
- From: Jens Granseuer <jensg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] mouse: skip button mappings only for core devices.
- Date: Sun, 6 Sep 2009 10:20:15 +0000 (UTC)
commit a5c3c61908662f50ece15a3e890a0a3b493f6799
Author: Peter Hutterer <peter hutterer who-t net>
Date: Wed Aug 26 14:06:39 2009 +1000
mouse: skip button mappings only for core devices.
Since X server 1.4, devices are unlikely to be marked as IsXExtensionDevice.
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.
Signed-off-by: Peter Hutterer <peter hutterer who-t net>
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 1b121ae..b5c96a1 100644
--- a/plugins/mouse/gsd-mouse-manager.c
+++ b/plugins/mouse/gsd-mouse-manager.c
@@ -279,7 +279,8 @@ set_xinput_devices_left_handed (gboolean left_handed)
for (i = 0; i < n_devices; i++) {
XDevice *device = NULL;
- if ((device_info[i].use != IsXExtensionDevice) ||
+ if ((device_info[i].use == IsXPointer) ||
+ (device_info[i].use == IsXKeyboard) ||
(!xinput_device_has_buttons (&device_info[i])))
continue;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]