GNOME Bugzilla – Bug 633863
middle mouse button emulation on/off toggle
Last modified: 2013-04-29 01:45:56 UTC
With the latest evdev driver, the default for the middle mouse button emulation has changed. See http://who-t.blogspot.com/2010/06/new-evdev-middle-mouse-button-emulation.html A checkbox in the GUI would be nice to allow for per-user preferences. Got the g-s-d parts mostly ready for it but in the GUI: do you want a change like this in the mouse config tool or the "universal access" tool? My guess is the former is the one people will start looking first, the latter already has second click emulation, so middle button emulation would fit nicely here.
I'm not sure we'd actually want to show that in the UI to be honest. As you mentioned, it doesn't affect touchpads, and I would expect very very few 2-button mice to be left around. I think just a g-s-d setting would be fine, and we could show it in the gnome plumbing tool.
Created attachment 173808 [details] [review] 0001-mouse-add-middle-button-enabled-key.patch This is the g-s-d patch, adds a middle-button-enabled key and toggles the matching evdev property (if any).
Review of attachment 173808 [details] [review]: ::: plugins/mouse/gsd-mouse-manager.c @@ +529,3 @@ + + if ((gdk_error_trap_pop () != 0)) + continue; And we're not leaking devices? @@ +534,3 @@ + continue; + + data[0] = middle_button; I'd rather: data[0] = middle_button ? 1 : 0;
Created attachment 173810 [details] [review] 0001-mouse-add-middle-button-enabled-key.patch changes to v1: - data[0] = middle_button ? 1 : 0; as suggested - two XDevice leaks fixed
Review of attachment 173810 [details] [review]: Looks good.
(In reply to comment #1) > I'm not sure we'd actually want to show that in the UI to be honest. > > As you mentioned, it doesn't affect touchpads The evdev change doesn't affect touchpads, but now the gnome-settings-daemon patch posted here does. :( Even if an X input driver or the X config itself specifies that 3rd mouse button emulation should be enabled, the g-s-d patch here ensures that GNOME will turn off that functionality by default as GNOME loads. So, if managing a setup with multiple desktops (including GNOME), where 3 button emulation is desired (e.g. on a laptop), the config choice must now be specified in two places: firstly in the X conf (for the non-GNOME desktops), secondly in gsettings (for GNOME). Not ideal. Can we do better?
I opened bug 678354 for this request.