Find the answer to your Linux question:
Results 1 to 2 of 2
Hi Firstly I apologize in advance for any information I leave out of this as this is one of the first things I've had to do on Linux (Boss has ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2014
    Posts
    1

    Touch Screen with Dual monitors


    Hi

    Firstly I apologize in advance for any information I leave out of this as this is one of the first things I've had to do on Linux (Boss has asked me to do it with no experience)

    Anyways, I'm currently trying to setup a touch screen for a dual screen monitor setup with one being a non touch screen monitor.
    When the second monitor is plugged in (non touch) the touch area is stretched across both of the monitors.
    So when I touch on the far right of the left screen the cursor will appear around the middle of the right screen.

    What I have been able to do so far is limit the touch screen to the touch monitor using the Xinput Coordinate Transformation matrix command in the terminal. But a side affect of this is that the 'cursor' from the touch becomes jittery. I can touch and drag perfectly but a short touch will have the cursor end up jumping all over the screen.

    I've seen many patches but haven't been able to apply them correctly, (never applied a patch before). I believe that all I need to do is apply a patch properly but I don't know where to start.

    Some information, tell me if I have missed anything

    Touch screen: Ilitek Ilitek Multi-Touch
    Version: 2:1.11.4 - 0ubuntu10.7

    The patches I've been trying to apply are similar to this
    diff --git a/dix/getevents.c b/dix/getevents.c
    index c960d44..d466ebb 100644
    --- a/dix/getevents.c
    +++ b/dix/getevents.c
    @@ -1167,15 +1167,25 @@ transformAbsolute(DeviceIntPtr dev, ValuatorMask *mask)
    {
    double x, y, ox, oy;

    + if (!valuator_mask_isset(mask, 0) || !valuator_mask_isset(mask, 1)) {
    + struct pixman_f_transform invert;
    +
    + /* undo transformation from last event */
    + ox = dev->last.valuators[0];
    + oy = dev->last.valuators[1];
    +
    + pixman_f_transform_invert(&invert, &dev->transform);
    + transform(&invert, &ox, &oy);
    +
    + x = ox;
    + y = oy;
    + }
    +
    if (valuator_mask_isset(mask, 0))
    ox = x = valuator_mask_get_double(mask, 0);
    - else
    - ox = x = dev->last.valuators[0];

    if (valuator_mask_isset(mask, 1))
    oy = y = valuator_mask_get_double(mask, 1);
    - else
    - oy = y = dev->last.valuators[1];

    transform(&dev->transform, &x, &y);

    saved in a patch file on the desktop, I just dont know how to apply them.
    Last edited by Fishcakes93; 01-09-2014 at 01:29 AM.

  2. #2
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,311
    There is a patch command and it is very simple to use - see "man patch" for details - and here is an interesting article (in part because it interviews Larry Wall the originator of patch) An Introduction to Patch LG #32.

    That said, that is C code you're patching and will have to be compiled after being patched. You really should be looking for an updated driver I think rather then patching the one you have (I'm guessing this is from a driver), or downloading the patched code and building it. You'll probably find it simpler, in my opinion.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •