After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 633863 - middle mouse button emulation on/off toggle
middle mouse button emulation on/off toggle
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: mouse
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
plumbing
Depends on:
Blocks:
 
 
Reported: 2010-11-02 23:14 UTC by Peter Hutterer
Modified: 2013-04-29 01:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-mouse-add-middle-button-enabled-key.patch (5.11 KB, patch)
2010-11-04 01:07 UTC, Peter Hutterer
reviewed Details | Review
0001-mouse-add-middle-button-enabled-key.patch (5.35 KB, patch)
2010-11-04 02:09 UTC, Peter Hutterer
committed Details | Review

Description Peter Hutterer 2010-11-02 23:14:16 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.
Comment 1 Bastien Nocera 2010-11-03 14:09:23 UTC
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.
Comment 2 Peter Hutterer 2010-11-04 01:07:08 UTC
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).
Comment 3 Bastien Nocera 2010-11-04 01:11:30 UTC
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;
Comment 4 Peter Hutterer 2010-11-04 02:09:34 UTC
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
Comment 5 Bastien Nocera 2010-11-04 11:47:17 UTC
Review of attachment 173810 [details] [review]:

Looks good.
Comment 6 Daniel Drake 2012-06-15 23:38:26 UTC
(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?
Comment 7 Daniel Drake 2012-06-18 20:08:04 UTC
I opened bug 678354 for this request.