Package: gnome-settings-daemon
Version: 2.28.1-2
Severity: wishlist
GSD hard-wires 2-finger taps to button 3 and 3-finger taps to button 2,
but I much prefer it the other way round. I've created a new gconf
setting "/desktop/gnome/peripherals/touchpad/reverse_multi_buttons" so
users can choose which way round they want these taps/buttons allocated.
I realise this should go upstream, but creating a debian patch was the
quickest and easiest way to solve the immediate problem for myself.
Please let me know whether you want me to forward this upstream.
See also <https://bugzilla.gnome.org/show_bug.cgi?id=609849> and
<https://bugzilla.gnome.org/show_bug.cgi?id=609917>.
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1,
'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages gnome-settings-daemon depends on:
ii gconf2 2.28.0-1 GNOME configuration database syste
ii libc6 2.10.2-6 Embedded GNU C Library: Shared lib
ii libcairo2 1.8.8-2 The Cairo 2D vector graphics libra
ii libdbus-1-3 1.2.20-2 simple interprocess messaging syst
ii libdbus-glib-1-2 0.84-1 simple interprocess messaging syst
ii libfontconfig1 2.8.0-2 generic font configuration library
ii libgconf2-4 2.28.0-1 GNOME configuration database syste
ii libglib2.0-0 2.22.4-1 The GLib library of C routines
ii libgnome-desktop-2-11 2.28.2-1 Utility library for loading .deskt
ii libgnomekbd4 2.28.2-1 GNOME library to manage keyboard c
ii libgstreamer-plugins-base0.10 0.10.26-1 GStreamer libraries from the "base
ii libgstreamer0.10-0 0.10.26-1 Core GStreamer libraries and eleme
ii libgtk2.0-0 2.18.6-1 The GTK+ graphical user interface
ii libnotify1 [libnotify1-gtk2.1 0.4.5-1 sends desktop notifications to a n
ii libx11-6 2:1.3.3-1 X11 client-side library
ii libxi6 2:1.3-2 X11 Input extension library
ii libxklavier15 4.0-2 X Keyboard Extension high-level AP
gnome-settings-daemon recommends no packages.
Versions of packages gnome-settings-daemon suggests:
ii gnome-screensaver 2.28.2-1 GNOME screen saver and locker
ii kde-window-manager [x-window- 4:4.3.4-4 the KDE 4 window manager (KWin)
ii metacity [x-window-manager] 1:2.28.0-3 lightweight GTK+ window manager
ii openbox [x-window-manager] 3.4.10-1 standards compliant, fast, light-w
ii twm [x-window-manager] 1:1.0.4-2 Tab window manager
ii x11-xserver-utils 7.5+1 X server utilities
ii xfwm4 [x-window-manager] 4.6.1-1 window manager of the Xfce project
-- no debconf information
--
TH * http://www.realh.co.uk
Index: gnome-settings-daemon-2.28.1/data/desktop_gnome_peripherals_touchpad.schemas.in
===================================================================
--- gnome-settings-daemon-2.28.1.orig/data/desktop_gnome_peripherals_touchpad.schemas.in 2010-02-17 16:19:15.667170208 +0000
+++ gnome-settings-daemon-2.28.1/data/desktop_gnome_peripherals_touchpad.schemas.in 2010-02-17 16:19:31.290492405 +0000
@@ -50,5 +50,17 @@
</locale>
</schema>
+ <schema>
+ <key>/schemas/desktop/gnome/peripherals/touchpad/reverse_multi_buttons</key>
+ <applyto>/desktop/gnome/peripherals/touchpad/reverse_multi_buttons</applyto>
+ <owner>gnome</owner>
+ <type>bool</type>
+ <default>FALSE</default>
+ <locale name="C">
+ <short>Reverse sense of 2- and 3-finger tapping</short>
+ <long>Set this to TRUE so that 2-finger taps are middle-click and 3-finger taps are right-click instead of vice versa.</long>
+ </locale>
+ </schema>
+
</schemalist>
</gconfschemafile>
Index: gnome-settings-daemon-2.28.1/plugins/mouse/gsd-mouse-manager.c
===================================================================
--- gnome-settings-daemon-2.28.1.orig/plugins/mouse/gsd-mouse-manager.c 2010-02-17 16:16:58.111503079 +0000
+++ gnome-settings-daemon-2.28.1/plugins/mouse/gsd-mouse-manager.c 2010-02-17 16:19:03.451749470 +0000
@@ -66,6 +66,7 @@
#define KEY_TAP_TO_CLICK GCONF_TOUCHPAD_DIR "/tap_to_click"
#define KEY_SCROLL_METHOD GCONF_TOUCHPAD_DIR "/scroll_method"
#define KEY_PAD_HORIZ_SCROLL GCONF_TOUCHPAD_DIR "/horiz_scroll_enabled"
+#define KEY_PAD_REV_MULTI_BTN GCONF_TOUCHPAD_DIR "/reverse_multi_buttons"
struct GsdMouseManagerPrivate
{
@@ -540,7 +541,7 @@
}
static int
-set_tap_to_click (gboolean state)
+set_tap_to_click (gboolean state, gboolean reverse)
{
int numdevices, i, format, rc;
unsigned long nitems, bytes_after;
@@ -568,8 +569,8 @@
{
/* Set RLM mapping for 1/2/3 fingers*/
data[4] = (state) ? 1 : 0;
- data[5] = (state) ? 3 : 0;
- data[6] = (state) ? 2 : 0;
+ data[5] = (state) ? (reverse ? 2 : 3) : 0;
+ data[6] = (state) ? (reverse ? 3 : 2) : 0;
XChangeDeviceProperty (GDK_DISPLAY (), device, prop, XA_INTEGER, 8,
PropModeReplace, data, nitems);
}
@@ -818,7 +819,8 @@
set_motion_threshold (manager, gconf_client_get_int (client, KEY_MOTION_THRESHOLD, NULL));
set_disable_w_typing (manager, gconf_client_get_bool (client, KEY_TOUCHPAD_DISABLE_W_TYPING, NULL));
- set_tap_to_click (gconf_client_get_bool (client, KEY_TAP_TO_CLICK, NULL));
+ set_tap_to_click (gconf_client_get_bool (client, KEY_TAP_TO_CLICK, NULL),
+ gconf_client_get_bool (client, KEY_PAD_REV_MULTI_BTN, NULL));
set_edge_scroll (gconf_client_get_int (client, KEY_SCROLL_METHOD, NULL));
set_horiz_scroll (gconf_client_get_bool (client, KEY_PAD_HORIZ_SCROLL, NULL));
@@ -848,7 +850,12 @@
set_disable_w_typing (manager, gconf_value_get_bool (entry->value));
} else if (! strcmp (entry->key, KEY_TAP_TO_CLICK)) {
if (entry->value->type == GCONF_VALUE_BOOL)
- set_tap_to_click (gconf_value_get_bool (entry->value));
+ set_tap_to_click (gconf_value_get_bool (entry->value),
+ gconf_client_get_bool (client, KEY_PAD_REV_MULTI_BTN, NULL));
+ } else if (! strcmp (entry->key, KEY_PAD_REV_MULTI_BTN)) {
+ if (entry->value->type == GCONF_VALUE_BOOL)
+ set_tap_to_click (gconf_client_get_bool (client, KEY_TAP_TO_CLICK, NULL),
+ gconf_value_get_bool (entry->value));
} else if (! strcmp (entry->key, KEY_SCROLL_METHOD)) {
if (entry->value->type == GCONF_VALUE_INT) {
set_edge_scroll (gconf_value_get_int (entry->value));
@@ -928,7 +935,8 @@
gconf_client_get_bool (client, KEY_DELAY_ENABLE, NULL));
set_disable_w_typing (manager, gconf_client_get_bool (client, KEY_TOUCHPAD_DISABLE_W_TYPING, NULL));
- set_tap_to_click (gconf_client_get_bool (client, KEY_TAP_TO_CLICK, NULL));
+ set_tap_to_click (gconf_client_get_bool (client, KEY_TAP_TO_CLICK, NULL),
+ gconf_client_get_bool (client, KEY_PAD_REV_MULTI_BTN, NULL));
set_edge_scroll (gconf_client_get_int (client, KEY_SCROLL_METHOD, NULL));
set_horiz_scroll (gconf_client_get_bool (client, KEY_PAD_HORIZ_SCROLL, NULL));