Bug 19282 - Events handled wrong when master button map differs from the originating device...
Summary: Events handled wrong when master button map differs from the originating dev...
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Input/Core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Peter Hutterer
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2008-12-25 07:49 UTC by Alexia Death
Modified: 2009-01-14 15:50 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
0001-mi-ensure-chained-button-mappings-from-SD-MD-1.patch (3.24 KB, patch)
2009-01-07 18:11 UTC, Peter Hutterer
no flags Details | Splinter Review

Description Alexia Death 2008-12-25 07:49:15 UTC
Wacom driver modifies its button map to suit its needs runtime and this is totally ignored when sending its events out as events for master device.

As a result stylus touch clicks no longer get forwarded because the key is not mapped and the rest of the button events do not have correct meanings.

My current workaround is  in mi/mieq.c in mieqProcessInputEvents
---
                /* process slave first, then master */
                dev->public.processInputProc(event, dev, nevents);
                if (master){    
                    if(master->button && dev->button) 
                        master->button->map[master_event->u.u.detail]=dev->button->map[event->u.u.detail];
                    master->public.processInputProc(master_event, master,
                                                    nevents);
                    
                }
---

Basically just checking that both devices have button structs and coping the map value. Not a very nice hack. This needs a proper solution...

And it is a serious problem in tablet usage....
Comment 1 Peter Hutterer 2009-01-07 18:11:17 UTC
Created attachment 21775 [details] [review]
0001-mi-ensure-chained-button-mappings-from-SD-MD-1.patch

mi: ensure chained button mappings from SD -> MD (#19282)
    
After copying the master event, flip the detail field to the mapped button of
the SD, not the physical button. This way if the SD has a mapping 1:3 and the
MD has a mapping of 3:4, a press on button 1 on the SD results in a core event
on button 4.
Comment 2 Alexia Death 2009-01-09 14:15:28 UTC
This patch does not apply on 1.6 branch so I cant test it :(
Comment 3 Peter Hutterer 2009-01-11 22:40:10 UTC
(In reply to comment #2)
> This patch does not apply on 1.6 branch so I cant test it :(

Are you sure? I just cherry-picked it onto 02c059ea99a791b9e3643b4fb131af01306b1c23 and it worked fine.
Comment 4 Alexia Death 2009-01-12 10:00:34 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > This patch does not apply on 1.6 branch so I cant test it :(
> 
> Are you sure? I just cherry-picked it onto
> 02c059ea99a791b9e3643b4fb131af01306b1c23 and it worked fine.
> 

Actually, no... I tried it on the snapshot jaunty has, not the git 1.6... Sorry about the confusion. I have not gotten git to run without crashing yet...
Comment 5 Peter Hutterer 2009-01-14 15:50:49 UTC
Pushed as d645721170b1196e5064b397cfbffd1da8c79bb1. Please reopen if the bug persists.


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.