Re: Rotation and calibration

2008-10-06 Thread Rodrigo Vivi
You shouldn't experience this.

Maybe there is a bug in your xserver which should be handling it
transparently using a tranformCordinates matrix.

Please take a look to this patch:
http://labs.vivi.eng.br/blog/rotation-patches/adding-support-to-xrandr-on-xomap.patch
mainly considering the hw/kdrive/src/kinput.c changes...

I did it some time ago to fix the rotation on Mamona/Maemo. I hope it helps.

Cheers,
vivijim

On Sat, Oct 4, 2008 at 12:09 PM, Ryan Gallagher [EMAIL PROTECTED] wrote:

 I have screen rotation working using Xrandr and a launcher which is
 added to the panel.  The problem is that when I rotate, the Touch screen
 is way off.  Is there any way to save two different calibration files
 and swap them out via CLI so that I can add the command to the launcher
 when it rotates?  Also if there is an easier way, I would love to use
 that instead.

 Thanks,
 Ryan.

 --
 Ubuntu-mobile mailing list
 Ubuntu-mobile@lists.ubuntu.com
 Modify settings or unsubscribe at:
 https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile




-- 
Rodrigo Vivi
INdT - Instituto Nokia de Tecnologia
Blog: http://blog.vivi.eng.br
GPG: 0x905BE242 @ wwwkeys.pgp.net
-- 
Ubuntu-mobile mailing list
Ubuntu-mobile@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile


Re: Rotation and calibration

2008-10-06 Thread Rodrigo Vivi
Hi,

Actually don't apply that patch directly because it is for xomap.

The only part that may be useful for you is this: (against kinput.c)

diff -ruN xorg-server-1.3.99.0~git20070321/hw/kdrive/src/kinput.c
/indt/randr/xorg-server-1.3.99.0~git20070321/hw/kdrive/src/kinput.c
--- xorg-server-1.3.99.0~git20070321/hw/kdrive/src/kinput.c 2007-10-17
07:53:52.0 -0300
+++ /indt/randr/xorg-server-1.3.99.0~git20070321/hw/kdrive/src/kinput.c 
2007-12-21
14:08:53.0 -0300
@@ -654,6 +654,7 @@
if (m-matrix[i][j]  0)
m-matrix[i][2] = size[j] - 1;
 }
+
 }

 static void
@@ -2009,20 +2010,24 @@
 ms = GetTimeInMillis();

 /* we don't need to transform z, so we don't. */
-if (pi-transformCoordinates) {
-x = matrix[0][0] * rx + matrix[0][1] * ry;
-y = matrix[1][0] * rx + matrix[1][1] * ry;
-}
-else {
-x = rx;
-y = ry;
-}
+x = rx;
+y = ry;
 z = rz;

-if (flags  KD_MOUSE_DELTA)
+if (flags  KD_MOUSE_DELTA) {
 dixflags = POINTER_RELATIVE | POINTER_ACCELERATE;
-else
+if (pi-transformCoordinates) {
+x = matrix[0][0] * rx + matrix[0][1] * ry;
+y = matrix[1][0] * rx + matrix[1][1] * ry;
+}
+}
+else {
 dixflags = POINTER_ABSOLUTE;
+if (pi-transformCoordinates) {
+x = matrix[0][0] * rx + matrix[0][1] * ry + matrix[0][2];
+y = matrix[1][0] * rx + matrix[1][1] * ry + matrix[1][2];
+}
+}

 _KdEnqueuePointerEvent(pi, MotionNotify, x, y, z, 0, dixflags, FALSE);


However, take a look to kinput.c from xorg main stream to see if there
is something better there...
This patch is a little bit old...

Best Regards,
vivijim


On Mon, Oct 6, 2008 at 12:46 PM, Ryan Gallagher [EMAIL PROTECTED] wrote:

 Thanks Rodrigo, which file am I supposed to apply this patch against?

 Kindest Regards,
 Ryan Gallagher.

 Rodrigo Vivi wrote:

 You shouldn't experience this.

 Maybe there is a bug in your xserver which should be handling it 
 transparently using a tranformCordinates matrix.

 Please take a look to this patch:
 http://labs.vivi.eng.br/blog/rotation-patches/adding-support-to-xrandr-on-xomap.patch
 mainly considering the hw/kdrive/src/kinput.c changes...

 I did it some time ago to fix the rotation on Mamona/Maemo. I hope it helps.

 Cheers,
 vivijim

 On Sat, Oct 4, 2008 at 12:09 PM, Ryan Gallagher [EMAIL PROTECTED] wrote:

 I have screen rotation working using Xrandr and a launcher which is
 added to the panel.  The problem is that when I rotate, the Touch screen
 is way off.  Is there any way to save two different calibration files
 and swap them out via CLI so that I can add the command to the launcher
 when it rotates?  Also if there is an easier way, I would love to use
 that instead.

 Thanks,
 Ryan.

 --
 Ubuntu-mobile mailing list
 Ubuntu-mobile@lists.ubuntu.com
 Modify settings or unsubscribe at: 
 https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile



 --
 Rodrigo Vivi
 INdT - Instituto Nokia de Tecnologia
 Blog: http://blog.vivi.eng.br
 GPG: 0x905BE242 @ wwwkeys.pgp.net



--
Rodrigo Vivi
INdT - Instituto Nokia de Tecnologia
Blog: http://blog.vivi.eng.br
GPG: 0x905BE242 @ wwwkeys.pgp.net

-- 
Ubuntu-mobile mailing list
Ubuntu-mobile@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-mobile