[Multi-touch-dev] [RFC XI 2.1] current issues

Denis Dzyubenko shadone at gmail.com
Fri Dec 10 05:22:07 PST 2010


Hi,

On 8 December 2010 00:44, Daniel Stone <daniel at fooishbar.org> wrote:
>> > The min/max of the major/minor (aka width/height) is actually not that important
>> > - they are all calibrated in devices coordinates, so using the same scale for
>> > all of x/y/major/minor gives you the best result.
>>
>> well I still do not know what _is_ the scale. Actually I am not using
>> MTAbsX/Y right now - I mainly rely on the root_x/root_y properties.
>
> Right, so that would explain why you're getting screen-scaled
> co-ordinates ... if you want unscaled, look at the x and y valuators
> attached to the event, rather than root_{x,y}, which is by definition in
> screen co-ordinate space.

sorry for misunderstanding, let me try again.

I _was_ using AbsX/Y valuators before I realized that for my case it
is easier to use root_x/y.

However I was getting wrong values from those valuators - here is the
output of the xinput test-xi2 tool when I touch in the bottom right
corner of my screen:
EVENT type 20 (TouchMotion)
    device: 10 (10)
    detail: 86
    flags:
    root: 1258.53/769.11
    event: 179.53/170.11
    buttons:
    modifiers: locked 0 latched 0 base 0 effective: 0
    group: locked 0 latched 0 base 0 effective: 0
    valuators:
        1: 236.00
        3: 1259.00
        4: 769.00
    windows: root 0x14e event 0x4600001 child 0x4600001

However, from the kernel I see correct values - here is the output of
the evtest app:
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x1b96 product 0x1 version 0x110
Input device name: "N-Trig MultiTouch"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 330 (Touch)
  Event type 3 (Absolute)
    Event code 0 (X)
      Value   9327
      Min        0
      Max     9600
      Fuzz      75
    Event code 1 (Y)
      Value   7078
      Min        0
      Max     7200
      Fuzz      78
    Event code 48 (Touch Major)
      Value      0
      Min        0
      Max     9600
      Fuzz     200
    Event code 49 (Touch Minor)
      Value      0
      Min        0
      Max     7200
      Fuzz     150
    Event code 52 (Orientation)
      Value      0
      Min        0
      Max        1
    Event code 53 (Position X)
      Value      0
      Min        0
      Max     9600
      Fuzz      75
    Event code 54 (Position Y)
      Value      0
      Min        0
      Max     7200
      Fuzz      78

Event: time 1291987102.863657, -------------- Config Sync ------------
Event: time 1291987102.863667, -------------- Report Sync ------------
Event: time 1291987102.873635, type 3 (Absolute), code 53 (Position
X), value 9394
Event: time 1291987102.873641, type 3 (Absolute), code 54 (Position
Y), value 7029
Event: time 1291987102.873643, type 3 (Absolute), code 52 (Orientation), value 0
Event: time 1291987102.873645, type 3 (Absolute), code 48 (Touch
Major), value 360
Event: time 1291987102.873647, type 3 (Absolute), code 49 (Touch
Minor), value 308
Event: time 1291987102.873650, -------------- Config Sync ------------
Event: time 1291987102.873659, -------------- Report Sync ------------

As you can see when using XI2.1 I the AbsX axis has range 0 to 9600,
however touching in the bottom-right corner gives me value 1259 (the
resolution of my display is 1280x800), hence someone on the X side
modifies those values.

-- 
Best regards,
Denis.


More information about the xorg-devel mailing list