Bug 43942

Summary: Button state in XI2 events is wrong for mapped buttons
Product: xorg Reporter: Peter Hutterer <peter.hutterer>
Component: Server/Input/CoreAssignee: Peter Hutterer <peter.hutterer>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 36141    

Description Peter Hutterer 2011-12-18 18:37:41 UTC

If the device is mapped 3 2 1, a click on physical button 1 sends a button 3
press, but the state was set for button 1. Fix this, the state must be set
for that button's logical mapping.

Patch here: http://patchwork.freedesktop.org/patch/8367/
Comment 1 Jeremy Huddleston Sequoia 2012-01-02 20:33:38 UTC
This is fixed on master and in server-1.11-branch.
Comment 2 Peter Hutterer 2012-02-11 00:16:42 UTC
commit fcda98c48610fd507ca0b89c6006a5497d9dc1c9
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Dec 16 12:41:08 2011 +1000

    dix: button state must show the logical buttons, not physical buttons
Comment 3 Olaf 'Rhialto' Seibert 2016-08-21 21:37:04 UTC
In a file near to this fix, dix/events.c, I see a similar idiom to the one being patched here. Look for mouse->button->down. Should that one get the same treatment? One other occurrence in the same directory (dix/enterleave.c) is already like the patched version.

I checked https://cgit.freedesktop.org/xorg/xserver/tree/dix/events.c to see if I wasn't looking at an old version.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.