GNOME Bugzilla – Bug 599623
Patch to allow left-handed touchpads
Last modified: 2009-10-30 18:30:32 UTC
Created attachment 146245 [details] [review] patch to reverse tap-to-click order for left-handed devices Touchpads cannot be switched to left-handed as this confuses the button mapping for tap-to-click, resulting in single-finger taps being right button clicks, etc. In X, button mapping is handled in the server, tapping in the driver. The driver forwards tapping just like the physical buttons and the server is unaware that tapping is "special". The fix is simply to reverse the tapping mapping for left handed device to cancel out the button mapping in the server. right-handed: - physical button 1 - posted as button 1 - mapped to logical button 1 - physical button 3 - posted as button 3 - mapped to logical button 3 - single-finger tap - posted as button 1 - mapped to logical button 1 left-handed: - physical button 1 - posted as button 1 - mapped to logical button 3 - physical button 3 - posted as button 3 - mapped to logical button 1 - single-finger tap - posted as button 1 - mapped to logical button 3 this is the issue described here. left-handed with patch attached: - physical button 1 - posted as button 1 - mapped to logical button 3 - physical button 3 - posted as button 3 - mapped to logical button 1 - single-finger tap - posted as button 3 - mapped to logical button 1
Review of attachment 146245 [details] [review]: ::: plugins/mouse/gsd-mouse-manager.c @@ +291,3 @@ device = device_is_touchpad (device_info[i]); if (device != NULL) { + GConfClient *client = gconf_client_get_default (); Please unref the client when you're done.
Created attachment 146308 [details] [review] 0001-mouse-allow-left-handed-setting-for-touchpads.patch done. diff to previous patch: diff --git a/plugins/mouse/gsd-mouse-manager.c b/plugins/mouse/gsd-mouse-manager.c index 21acca6..bc83a0f 100644 --- a/plugins/mouse/gsd-mouse-manager.c +++ b/plugins/mouse/gsd-mouse-manager.c @@ -296,6 +296,7 @@ set_xinput_devices_left_handed (gboolean left_handed) if (tap) set_tap_to_click (tap, left_handed); XCloseDevice (GDK_DISPLAY (), device); + g_object_unref (client); } gdk_error_trap_push ();
Review of attachment 146308 [details] [review]: Thanks. Feel free to commit with an update to the comment. (Do you have a g.g.o account?) ::: plugins/mouse/gsd-mouse-manager.c @@ +290,1 @@ * around, otherwise a tap would be a right-click */ It seems to me this comment is no longer true after your changes. Care to update this as well?
Created attachment 146402 [details] [review] 0001-mouse-allow-left-handed-setting-for-touchpads.patch diff to previous patch: - /* If the device is a touchpad, don't swap buttons - * around, otherwise a tap would be a right-click */ + /* If the device is a touchpad, swap tap buttons + * around too, otherwise a tap would be a right-click */ I don't have a git account yet (haven't applied yet either), please commit for me.