Here's touch calculations taken from Android documentation on Linux touch input:
xScale = output.width / raw.width yScale = output.height / raw.height If not orientation aware or screen rotation is 0 degrees: output.x = (raw.x - raw.x.min) * xScale output.y = (raw.y - raw.y.min) * yScale Else If rotation is 90 degrees: output.x = (raw.y - raw.y.min) * yScale output.y = (raw.x.max - raw.x) * xScale Else If rotation is 180 degrees: output.x = (raw.x.max - raw.x) * xScale output.y = (raw.y.max - raw.y) * yScale Else If rotation is 270 degrees: output.x = (raw.y.max - raw.y) * yScale output.y = (raw.x - raw.x.min) * xScale End If These are taken from this page: https://source.android.com/devices/tech/input/touch-devices.html The problem might be that X is not calculating the correct cursor positions when the screen is rotated using xrandr -Sandeep On Mon, Oct 21, 2013 at 2:59 PM, Sandeep <sandy.8...@gmail.com> wrote: > For input, I am using xf86-input-evdev . I am not using the proprietary > eGalax driver. I might be wrong about the input rotating with the screen. > > The problem is the mouse cursor/pointer location does not correspond to > the touch input. The movement of the cursor does correspond to the touch > input, but seems to be rotated the same way the screen has been rotated. > > For example, assume a 11 inch display with a resolution of 1280*800 . The > default orientation is the upright landscape orientation. I use the KDE > screen rotation utility (krandrtray) to rotate the screen left by 90 > degrees(portrait). When I touch near the top left corner (in the upright > landscape orientation), the mouse cursor jumps to a corresponding position > near the top left corner in portrait mode. > > So, there is a definite pattern connecting the touch input position and > the mouse cursor position - it looks like the input position is rotated the > same way display was rotated. > > If I use the coordinate transformation matrix in the script here: > https://wiki.archlinux.org/index.php/Multitouch_Displays#Rotating_the_touch_screen > (see "Rotating the touch screen" section) > > It works correctly - the mouse cursor follows the touch input. > > Also, this problem is not specific to KDE, but also GNOME and even the > Fluxbox window manager. > > -Sandeep > > > > > > > On Mon, Oct 21, 2013 at 2:41 PM, Peter Hutterer > <peter.hutte...@who-t.net>wrote: > >> On Fri, Oct 04, 2013 at 05:36:00PM -0700, Sandeep wrote: >> > Hi, >> > >> > I have an Acer Iconia Tab W500. It has an eGalax touchscreen. Single >> touch >> > input works. >> > >> > I mainly use KDE, and when I rotate the screen using the Krandrtray >> > application, the mouse input works fine, but the touchscreen input does >> not >> > work correctly. >> > >> > Here is a video showing the problem: >> > http://www.youtube.com/watch?v=OviHJmjhoOI >> > >> > It looks like the touch driver rotates the input in the same way that >> the >> > screen is rotated, thus producing wrong/unexpected behaviour. >> > >> > I tried searching for existing bugs at bugs.freedesktop.org and it >> doesn't >> > look like any of them cover this problem. Does anyone know what the >> problem >> > might be, and how I can figure out where the problem lies? >> >> what driver are you using? no X driver currently rotates with the screen, >> it's something that needs to be triggered from the outside so chances are >> that whatever triggers the rotation in KDE is triggering the wrong thing. >> >> Cheers, >> Peter >> > >
_______________________________________________ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.x.org/mailman/listinfo/xorg Your subscription address: arch...@mail-archive.com