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 764209 - Primary Button not Respected
Primary Button not Respected
Status: RESOLVED NOTGNOME
Product: gnome-control-center
Classification: Core
Component: Mouse
3.19.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-03-25 20:40 UTC by Preston
Modified: 2016-04-20 16:26 UTC
See Also:
GNOME target: ---
GNOME version: 3.19/3.20



Description Preston 2016-03-25 20:40:44 UTC
Using X as a backend, the Mouse & Touchpad settings do not seem to have any effect on which button is the primary button. Regardless of whether I change settings in dconf or the settings gui, the left button is always the primary button on both my touchpad and my mouse.

Settings on wayland work as expected (yay!).

Furthermore, this distinction between General, Mouse, and Touchpad in the settings gui does not make sense to me. If we can set individual speeds for both the mouse and the touchpad, why can we not set the primary buttons for each? The options in dconf make much more sense to me-- regardless of whether my mouse is right or left handed, I always want my touchpad to be right handed.
Comment 1 Rui Matos 2016-03-26 18:31:12 UTC
(In reply to Preston from comment #0)
> Using X as a backend, the Mouse & Touchpad settings do not seem to have any
> effect on which button is the primary button. Regardless of whether I change
> settings in dconf or the settings gui, the left button is always the primary
> button on both my touchpad and my mouse.

What kind of pointer devices do you have? Please paste the output of running "xinput" here.

I can reproduce this bug on a Thinkpad X240 which has a trackpoint and a buttonless touchpad where the trackpoint "buttons" are emulated by clicks on the top area of the touchpad.

By default, GNOME applies the mouse left handed setting to all pointer devices but the touchpad can be configured independently. Interestingly, if I make the mouse be left handed but set the touchpad to right handed then the mouse (trackpoint) buttons work as intended (left handed). I suspect the emulation code in libinput applies the left handed setting twice when both the trackpoint and touchpad are set to left handed which results in the setting cancelling itself.

Can you confirm that?

> Settings on wayland work as expected (yay!).

Are you sure? It doesn't work on a wayland session either for me which reinforces my suspicion that this is a libinput bug.
Comment 2 Preston 2016-03-27 06:52:15 UTC
(In reply to Rui Matos from comment #1)
> What kind of pointer devices do you have? Please paste the output of running
> "xinput" here.

Under wayland,
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ xwayland-pointer:13                     	id=6	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ xwayland-keyboard:13                    	id=7	[slave  keyboard (3)]
Under XOrg:
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Logitech M325                           	id=9	[slave  pointer  (2)]
⎜   ↳ ETPS/2 Elantech Touchpad                	id=14	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Video Bus                               	id=7	[slave  keyboard (3)]
    ↳ Power Button                            	id=8	[slave  keyboard (3)]
    ↳ Apple Inc. Apple Keyboard               	id=10	[slave  keyboard (3)]
    ↳ Apple Inc. Apple Keyboard               	id=11	[slave  keyboard (3)]
    ↳ Laptop_Integrated_Webcam_HD             	id=12	[slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard            	id=13	[slave  keyboard (3)]
    ↳ Dell WMI hotkeys                        	id=15	[slave  keyboard (3)]

> By default, GNOME applies the mouse left handed setting to all pointer
> devices but the touchpad can be configured independently. Interestingly, if
> I make the mouse be left handed but set the touchpad to right handed then
> the mouse (trackpoint) buttons work as intended (left handed). I suspect the
> emulation code in libinput applies the left handed setting twice when both
> the trackpoint and touchpad are set to left handed which results in the
> setting cancelling itself.
> 
> Can you confirm that?
>
> > Settings on wayland work as expected (yay!).
> 
> Are you sure?

Below are the results of testing various configurations. Primary denotes whether I set the primary button to be L (left) or R (right) in mouse settings. This lines up with the mouse's entry in dconf.

Wayland:
Primary L:    Touchpad Left handed: works as expected
              Touchpad Right handed: works as expected
Primary R:    Touchpad Left handed: works as expected
              Touchpad Right handed: works as expected
              
XOrg
Primary L:    Touchpad Left handed: works as expected
              Touchpad Right handed: touchpad incorrectly has left button acting as primary while mouse works as expected
Primary R:    Touchpad Left handed: touchpad incorrect has left button acting as primary and left button of mouse incorrectly acts as primary
              Touchpad Right handed: touchpad works as expected, but left mouse button incorrectly acts as primary
              
In conclusion, every configuration above works as expected under wayland, while it seems that the settings under XOrg are disregarded. Both the left mouse button and the left touchpad button always act as the primary button in XOrg.
Comment 3 Peter Hutterer 2016-03-29 01:11:27 UTC
(In reply to Rui Matos from comment #1)
> Are you sure? It doesn't work on a wayland session either for me which
> reinforces my suspicion that this is a libinput bug.

yep, it's a libinput bug. I filed it here, fix will come asap

https://bugs.freedesktop.org/show_bug.cgi?id=94733
Comment 4 Peter Hutterer 2016-04-04 01:42:05 UTC
fwiw, fixed in libinput and will be available in the next release
Comment 5 Mike 2016-04-05 05:44:36 UTC
Is it available now ?
If yes, what deposit do I need to activate because left hand setting still doesn't work on my system (updated a few minutes ago).
Comment 6 Bastien Nocera 2016-04-05 07:54:10 UTC
(In reply to Mike from comment #5)
> Is it available now ?
> If yes, what deposit do I need to activate because left hand setting still
> doesn't work on my system (updated a few minutes ago).

It's fixed in libinput and will be available in the next release of libinput. Ask your distribution to pick up the patch if you need something quicker.
Comment 7 Mike 2016-04-11 09:46:42 UTC
I'm sorry I'm pretty new to these things, how can I have it patched ?
Because it's now a week and I still have the problem even when activating all the deposits :/

(I even thought of going to Ubuntu 16.04, the one with Unity desktop, even if I prefer Gnome, because that bug is very annoying for left handed people :( ).
Comment 8 Bastien Nocera 2016-04-11 09:53:14 UTC
(In reply to Mike from comment #7)
> I'm sorry I'm pretty new to these things, how can I have it patched ?

Ask your distribution.
Comment 9 Mike 2016-04-11 11:00:39 UTC
Yes that's the part I didn't understood lol.
I'm on Ubuntu Gnome 16.04 Beta2 with latest updates from all deposits, what should I do to "ask my distribution" ?
:/
Comment 10 Bastien Nocera 2016-04-11 11:49:56 UTC
(In reply to Mike from comment #9)
> Yes that's the part I didn't understood lol.
> I'm on Ubuntu Gnome 16.04 Beta2 with latest updates from all deposits, what
> should I do to "ask my distribution" ?
> :/

File a bug against your distribution, or use their various support avenues, like mailing-lists, or forums. I believe that libinput's downstream bug tracker is at:
https://launchpad.net/ubuntu/+source/libinput
Comment 11 Mike 2016-04-11 13:25:33 UTC
Ok I'll check it out thanks for your help :)
Comment 12 Mike 2016-04-20 16:26:46 UTC
Ok so after a few days of waiting after posting to the ubuntu launchpad page, I tested solution on this page 

http://askubuntu.com/questions/649103/proper-touchpad-thumb-palm-detection-with-libinput 

to install libinput in my Ubuntu Gnome distribution.
It worked perfectly so if anybody else is in the same boat as me with that left handed setting not applying correctly, he can try it too.

Hope to help anyone :)