Re: Synaptics patch: orientation

2008-11-23 Thread Peter Hutterer
On Sun, Nov 23, 2008 at 12:29:29PM +0100, Mildred Ki'Lya wrote:
> Well, I send them manually, and I used mercurial queues, I hope you'll
> forgive me :) I'm more used to them, that's all. Even if git seems very
> similar, it's still a bit different.

> > I like extensive commit messages where appropriate, but these ones
> > are a bit noisy. There's a lot of stuff that is obvious through the
> > code, so shortening it down to what is not immediately obvious would
> > be good. That goes for all three commits.
> 
> Well, probably, but in fact, I often find myself reading and reading
> the code to find out what it is doing. And if I could just read a
> summary of it, it would take me less much time. But I agree that for
> someone who knows the code, much of it may be unnecessary.

A commit should describe the intention of the changes, not the changes to the
code. There's not always a clear distinction, so you'll have to apply common
sense. 

> But, well, with patches, you won't have that kind of problems :)

actually, I do, because I need to write the commit messages myself now. If you
attach them in git format, I just need to run a single command to apply each
of them. So please resend your final patches as git formatted ones.

> > Also, if the orientation is to be changed at runtime, it should have
> > property support. You can provide that as a separate patch if you
> > want to.
> 
> I don't exactly understand what you mean here. If by property support
> you mean the possibility to modify the configuration using the shared
> memory, it's already implemented (there would be no point otherwise).
> If you mean something else ... well, I don't understand what it is.

google for input device property support, or just read the commit logs of
either synaptics, joystick or evdev. Long term, the shared memory will go away
for all but for debugging purposes.

> > > +.
> > > +.TP
> > > +.BI "Option \*qDontReportSize\*q \*q" boolean \*q
> > 
> > less verbose please.
> 
> is that ok?
> 
> 
> .BI "Option \*qReportSize\*q \*q" boolean \*q
> When enabled (default behaviour), this option will report the size of the
> trackpad to Xorg. The server usually uses this information to modify the speed
> of the axis depending on the size of the trackpad. Thus, it can lean to
> unreachable pixels (when the speed is increased too much) and can lead to
> strange behaviours when the trackpad is oriented (the speed is over-amplified 
> in
> a direction). So if you plan to use the orientation feature, you probably want
> to disable this (there is no way to change the trackpad size at runtime).

I'd prefer it to be even simpler but that's getting down to personal taste.

> > s/.../This option always specifies the vertical speed, regardless of
> > the orientation./
> > 
> > Just merge it into the VertSpeed section (see below) and adjust the
> > description accordingly:
> 
> Changed to:
> 
> .TP
> .BI "Option \*qHorizSpeed\*q \*q" float \*q
> Speed scale for the X axis. Modify the speed regardless of the orientation.
> ..
> .TP
> .BI "Option \*qVertSpeed\*q \*q" float \*q
> Speed scale for the Y axis. Modify the speed regardless of the orientation.

s/Modify/Modifies/

> 
 
> diff -r 9eb9da460bd8 include/synaptics.h
> --- a/include/synaptics.h Sun Nov 23 11:17:50 2008 +0100
> +++ b/include/synaptics.h Sun Nov 23 11:48:02 2008 +0100
> @@ -133,6 +133,7 @@
>  double press_motion_min_factor;  /* factor applied on speed when 
> finger pressure is at minimum */
>  double press_motion_max_factor;  /* factor applied on speed when 
> finger pressure is at minimum */
>  Bool grab_event_device;  /* grab event device for exclusive 
> use? */
> +int orientation; /* orientation of the trackpad */
>  } SynapticsSHM;
>  
>  /*
> diff -r 9eb9da460bd8 man/synaptics.man
> --- a/man/synaptics.man   Sun Nov 23 11:17:50 2008 +0100
> +++ b/man/synaptics.man   Sun Nov 23 11:48:02 2008 +0100
> @@ -384,6 +384,14 @@
>  .
>  This can be achieved by switching to a text console and then switching
>  back to X.
> +.TP
> +.BI "Option \*qOrientation\*q \*q" integer \*q
> +This option changes the orientation of the trackpad and can
> +takes values from 0 to 3. The default value 0 implies a normal orientation,
> +other values can be used to have respectively an orientation set to the
> +left, an inverted orientation, and an orientation set to the right.
> +This may be useful in combination with the orientation option of the XRandR
> +extension. The values used are the same to the values used by XRandR \-o 
> option.

XRandR is the extension, xrandr the tool, you need to s/XRandR/xrandr/ in the
last line.

from the xrandr man page:
"This specifies the orientation of the screen, and can be one of normal,
inverted, left or right."
This is about as consise as it gets, can we have a similar one?

> @@ -751,6 +753,8 @@
>  SynapticsPrivate *priv = (SynapticsPrivate *) (local->private);
>  unsigned char 

Re: Synaptics patch: orientation

2008-11-23 Thread Mildred Ki'Lya
Hi,

Excuse me for the delay, but I had many other things to do. So I just
had to wait until I had some time to spend on synaptics. So here are
the modified patches.


Le Thu 13/11/2008 à 12:09 Peter Hutterer à écrit:
> Then send these patches to the list (e.g. with git-send-email).
> Reason being is that it's easier to quote and point out things to
> change.

Well, I send them manually, and I used mercurial queues, I hope you'll
forgive me :) I'm more used to them, that's all. Even if git seems very
similar, it's still a bit different.



> > From 3a4cb5a4e3b2856d3aba4f9abfb9732b555494bf Mon Sep 17 00:00:00
> > 2001 From: Mildred Ki'Lya 
> > Date: Tue, 11 Nov 2008 13:02:36 +0100
> > Subject: [PATCH] Added Orientation option
> 
> > Changed bits of code all around to handle that properly. Especially
> > in the function ComputeDeltas() and HandleScrolling(). Those two
> > functions convert (using helper functions that I've added) the
> > hw->x and hw->y coordinates to oriented_x and oriented_y
> > coordinates. The angle used for circular scrolling do not use
> > oriented coordinates as i've taught it was not necessary, but I
> > haven't tested it though (i don't use circular scrolling).
> 
> > Moreover, in the function HandleState(), the variable edge contains
> > how the oriented edge. So the functions that use the edge are
> > automatically oriented. This is useful for HandleTap(). The buttons
> > in the corners of the pads are oriented without effort.
> 
> I like extensive commit messages where appropriate, but these ones
> are a bit noisy. There's a lot of stuff that is obvious through the
> code, so shortening it down to what is not immediately obvious would
> be good. That goes for all three commits.

Well, probably, but in fact, I often find myself reading and reading
the code to find out what it is doing. And if I could just read a
summary of it, it would take me less much time. But I agree that for
someone who knows the code, much of it may be unnecessary.

But, well, with patches, you won't have that kind of problems :)

> > ... man page ...
> 
> ... This option changes the orientation ...
> 
> ^^ typo
> 
> Again, please keep it short and to-the point. e.g. the second-to-last
> sentence is superfluous, last one can be shortened (no "You may
> notice").

fixed

> > @@ -1593,6 +1649,9 @@ HandleScrolling(SynapticsPrivate *priv,
> > struct SynapticsHwState *hw, {
> >  SynapticsSHM *para = priv->synpara;
> >  int delay = 10;
> > +int oriented_x = hw->x, oriented_y = hw->y;
> 
> Just use x, y instead of oriented_x, oriented_y please.

fixed

> >  edge = edge_detection(priv, hw->x, hw->y);
> > +edge = HandleEdgeOrientation(para->orientation, edge);
> 
> can we merge that into edge_detection so we don't have separate calls?

merged

> Missing from this patch is the code to readjust the valuators if the
> orientation was specified at startup.
> i.e. if option Orientation is set, change the
> xf86InitValuatorAxisStruct around accordingly so the ranges are
> correct. we can't do anything about run-time changes, but at least it
> should be correct for the startup setting.

done

> Also, if the orientation is to be changed at runtime, it should have
> property support. You can provide that as a separate patch if you
> want to.

I don't exactly understand what you mean here. If by property support
you mean the possibility to modify the configuration using the shared
memory, it's already implemented (there would be no point otherwise).
If you mean something else ... well, I don't understand what it is.

> > From 3c16621ca139ea6c4ef121da9a245c5456fe59ec Mon Sep 17 00:00:00
> > 2001 From: Mildred Ki'Lya 
> > Date: Tue, 11 Nov 2008 13:11:58 +0100
> > Subject: [PATCH] Added DontReportSize option
> 
> Replace as ReportSize option, set to TRUE by default.

done

> 
> > +Along with this option, you might be interested to enable the
> > DontReportSize +option. Read its documentation to know why.
> 
> replace with "See also: ReportSize"

done

> > +.
> > +.TP
> > +.BI "Option \*qDontReportSize\*q \*q" boolean \*q
> 
> less verbose please.

is that ok?


.BI "Option \*qReportSize\*q \*q" boolean \*q
When enabled (default behaviour), this option will report the size of the
trackpad to Xorg. The server usually uses this information to modify the speed
of the axis depending on the size of the trackpad. Thus, it can lean to
unreachable pixels (when the speed is increased too much) and can lead to
strange behaviours when the trackpad is oriented (the speed is over-amplified in
a direction). So if you plan to use the orientation feature, you probably want
to disable this (there is no way to change the trackpad size at runtime).


> s/.../This option always specifies the vertical speed, regardless of
> the orientation./
> 
> Just merge it into the VertSpeed section (see below) and adjust the
> description accordingly:

Changed to:

.TP
.BI "Option \*qHorizSpeed\*q \*q" float \*q

Re: Synaptics patch: orientation

2008-11-12 Thread Peter Hutterer
On Tue, Nov 11, 2008 at 01:27:34PM +0100, Mildred Ki'Lya wrote:
> Well, I don't really know how to creates patch series using git. It was
> easier for me to create a repository I made available on github:
> 
> git://github.com/mildred/xorg-synaptics-orientation-patch.git
> http://github.com/mildred/xorg-synaptics-orientation-patch/
 
git-format-patch HEAD~4 (for the last 4 patches)
git-format-patch -n HEAD~4 (to create a [PATCH 1/4] series)

Then send these patches to the list (e.g. with git-send-email). Reason being
is that it's easier to quote and point out things to change.

Now, for the suggested changes below: the easiest way is to go
edit
git-commit 
edit
git-commit
edit
git-commit

git rebase -i HEAD~8 (for the last 8 commits)
git-format-patch HEAD~4

then rearrange the commits, and squash them appropriately that you end up with
the semantically correct ones again. Just play around with git rebase -i a
bit, you'll get used to it quite quickly.
Once you're done, please resend the patches.


> From 3a4cb5a4e3b2856d3aba4f9abfb9732b555494bf Mon Sep 17 00:00:00 2001
> From: Mildred Ki'Lya 
> Date: Tue, 11 Nov 2008 13:02:36 +0100
> Subject: [PATCH] Added Orientation option

> Changed bits of code all around to handle that properly. Especially in the
> function ComputeDeltas() and HandleScrolling(). Those two functions convert
> (using helper functions that I've added) the hw->x and hw->y coordinates to
> oriented_x and oriented_y coordinates. The angle used for circular scrolling
> do not use oriented coordinates as i've taught it was not necessary, but I
> haven't tested it though (i don't use circular scrolling).

> Moreover, in the function HandleState(), the variable edge contains how the
> oriented edge. So the functions that use the edge are automatically oriented.
> This is useful for HandleTap(). The buttons in the corners of the pads are
> oriented without effort.

I like extensive commit messages where appropriate, but these ones are a bit
noisy. There's a lot of stuff that is obvious through the code, so shortening
it down to what is not immediately obvious would be good.
That goes for all three commits.

> +.TP
> +.BI "Option \*qOrientation\*q \*q" integer \*q
> +This option can be used to change the orientation of the trackpad and can

... This option changes the orientation ...

> +takes values from 0 to 3. The default value 0 implies a normal orientation,
> +other values can be used to have respectively an orientation set to the
> +left, an inverted orientation, and an orientation set to the right.
> +This may be useful in combinaison with the orientation option of the XRandR
^^ typo
> +extension. You may notice that the values used are the same to the values
> +used by XRandR.

Again, please keep it short and to-the point. e.g. the second-to-last sentence
is superfluous, last one can be shortened (no "You may notice").


> @@ -1593,6 +1649,9 @@ HandleScrolling(SynapticsPrivate *priv, struct 
> SynapticsHwState *hw,
>  {
>  SynapticsSHM *para = priv->synpara;
>  int delay = 10;
> +int oriented_x = hw->x, oriented_y = hw->y;

Just use x, y instead of oriented_x, oriented_y please.
 
>  edge = edge_detection(priv, hw->x, hw->y);
> +edge = HandleEdgeOrientation(para->orientation, edge);

can we merge that into edge_detection so we don't have separate calls?


Missing from this patch is the code to readjust the valuators if the
orientation was specified at startup.
i.e. if option Orientation is set, change the xf86InitValuatorAxisStruct
around accordingly so the ranges are correct.
we can't do anything about run-time changes, but at least it should be correct
for the startup setting.

Also, if the orientation is to be changed at runtime, it should have property
support. You can provide that as a separate patch if you want to.

> From 3c16621ca139ea6c4ef121da9a245c5456fe59ec Mon Sep 17 00:00:00 2001
> From: Mildred Ki'Lya 
> Date: Tue, 11 Nov 2008 13:11:58 +0100
> Subject: [PATCH] Added DontReportSize option

Replace as ReportSize option, set to TRUE by default.

> Perhaps there is a way to change the trackpad dimentions when we change
> orientation, but I don't know enough of the Worg internals to do that.

there isn't. not at runtime anyway.

> +Along with this option, you might be interested to enable the DontReportSize
> +option. Read its documentation to know why.

replace with "See also: ReportSize"

> +.
> +.TP
> +.BI "Option \*qDontReportSize\*q \*q" boolean \*q
> +This option prevent the synaptics driver from reporting the size of the 
> trackpad
> +to Xorg. Xorg can use this information to amplify the movements in one
> +direction. For example, if your trackpad is wider than higher, Xorg will 
> speed
> +up your vertical movements. For example, moving the mouse cursor every two
> +pixels when synaptics told Xorg that there was a movement on one unit along 
> the
> +y axis.
> +.
> +This is particularly useful with the Orientation optio

Re: Synaptics patch: orientation

2008-11-11 Thread Mildred Ki'Lya

Le Tue 11/11/2008 à 18:32 Magnus Kessler à écrit:
> Not necessarily ;). I for one have been using a number of desktop
> keyboards with a built-in touchpad over the years. Alternatively
> there are stand-alone touchpads on the market as well.

Oh, That's interesting.

Since I have a laptop I find it really awkward not to be able to use a
trackpad on desktops, it is very useful to have it just under the
keyboard.

Mildred

-- 
Mildred Ki'Lya
╭─ mildred593@online.fr ──
│ Jabber, GoogleTalk: <[EMAIL PROTECTED]>
│ Site:   GPG ID: 9A7D 2E2B
│ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Re: Synaptics patch: orientation

2008-11-11 Thread Magnus Kessler
On Tuesday 11 November 2008, Mildred Ki'Lya wrote:
> Hi,
>
> Le Tue 11/11/2008 à 15:21 Éric Piel à écrit:
> > > The next thing would be to automatically change the orientation of
> > > the trackpad when XRandR rotates the screen.
> >
> > Certainly not at the X server level. I have two screens, which
> > screen's orientation are you going to use? However, at a higher
> > level, like in the gnome applet for screen resolution, that would be
> > very useful.
>
> I was thinking at a higher level (like the gnome applet). But why not
> at the lower level (if specifically allowed in xorg.conf). The screen
> that would be monitored would be of course the laptop's screen (LVDS
> for me).
>
> Well, I guess that if you have a trackpad it's on a laptop, right?

Not necessarily ;). I for one have been using a number of desktop keyboards 
with a built-in touchpad over the years. Alternatively there are stand-alone 
touchpads on the market as well.

Magnus
>
> :)
>
> Mildred


___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Re: Synaptics patch: orientation

2008-11-11 Thread Mildred Ki'Lya
Hi,


Le Tue 11/11/2008 à 15:21 Éric Piel à écrit:
>
> Hi,
> It's great, it's a feature I've been really looking for!
> However, I have a couple of comments.
> 
> First, as this is clearly following the xrandr notions, I think it
> should call the same things the same. So let's call it "rotation"
> instead of "orientation" (unless in the inside of the Xrandr protocol
> it's called orientation?).

Well, xrandr uses the option -o/--orientation at least for me (RandR
version 1.2)

> Also, the idea of rotation has nothing specific to the synaptics
> touchpad, it's just generic to any pointer device. For instance, I
> think there was recently some patches to swap the axes in the evdev
> driver. Shouldn't all this infrastructure be in a generic layer? At
> least, it would be good if all the drivers conformed to the same
> features, property names, and property behaviour :-)

The reason is very simple, I already had a look into the synaptics code
(to implement emulation of middle and right clock on apple touchpads
that only have a single button). It's the only piece of code from Xorg I
know and can patch. if I had to change the implementation in the X
server, it would have been more difficult (impossible for me now, I'm
willing to learn but unfortunately don't have much time for it and
don't know how to find information).

So I agree with you, but I couldn't do that.

But isn't there a work going on to have a common way to change the
configuration of Xorg modules ? Currently synaptics uses the shared
library but it may change in the future if some new method is found
more appropriate.

Also, a reason to have it directly in synaptics would be that it allows
synaptics to rotate some features (like the edges and corners, used to
scroll and emulate other clicks).

> Last but not least, as a user, only the rotation is useful. I don't
> care about "DontReportSize", "VertSpeed" and "HorizSpeed", they are
> just tricks that have to be done to get the touchpad correctly
> behaving after a rotation is applied. They should be computed
> automatically.

For the DontReportSize, it may not be necessary as it is perhaps
possible for synaptics to change dynamically the trackpad's dimensions,
but I didn't knew how to do that. Moreover, Xorg generally speed up an
axis and thus makes it impossible (in my case actually) to move the
cursor of only one pixel in one direction.

I choosed to put this options so the normal behaviour of synaptics
would be the same as usual (I don't want to send a patch that changes
the default behaviour yet). And since we cannot change this
dynamically (for example when the orientation changes), I had to
include it as an option.

And for the speed option, I thought it could be interesting to have
them as options (so the user could manually tweak them) but I agree on
that point I could have computed the speeds depending on the trackpad's
dimensions when DontReportSize is true.

> > The next thing would be to automatically change the orientation of
> > the trackpad when XRandR rotates the screen.
> Certainly not at the X server level. I have two screens, which
> screen's orientation are you going to use? However, at a higher
> level, like in the gnome applet for screen resolution, that would be
> very useful.

I was thinking at a higher level (like the gnome applet). But why not
at the lower level (if specifically allowed in xorg.conf). The screen
that would be monitored would be of course the laptop's screen (LVDS
for me).

Well, I guess that if you have a trackpad it's on a laptop, right?



:)

Mildred


-- 
Mildred Ki'Lya
╭─ mildred593@online.fr ──
│ Jabber, GoogleTalk: <[EMAIL PROTECTED]>
│ Site:   GPG ID: 9A7D 2E2B
│ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Re: Synaptics patch: orientation

2008-11-11 Thread Éric Piel
Mildred Ki'Lya schreef:
> Hi,
> 
> I just finished my orientation patch for synaptics. It's not heavily
> tested for the moment. If anyone could test ...
> 
> I added 4 options to the driver, quoting from the man page:
> 
>Option "Orientation" "integer"
>   This option can be used to change the orientation of the  track‐
>   pad  and  can  takes  values  from  0  to 3. The default value 0
>   implies a normal orientation, other values can be used  to  have
>   respectively  an orientation set to the left, an inverted orien‐
>   tation, and an orientation set to the right.  This may be useful
>   in  combinaison with the orientation option of the XRandR exten‐
>   sion. You may notice that the values used are the  same  to  the
>   values  used  by  XRandR.   Along with this option, you might be
>   interested to enable the DontReportSize option. Read  its  docu‐
>   mentation to know why.
:
> 
>Option "DontReportSize" "boolean"
:
>
Hi,
It's great, it's a feature I've been really looking for!
However, I have a couple of comments.

First, as this is clearly following the xrandr notions, I think it
should call the same things the same. So let's call it "rotation"
instead of "orientation" (unless in the inside of the Xrandr protocol
it's called orientation?).

Also, the idea of rotation has nothing specific to the synaptics
touchpad, it's just generic to any pointer device. For instance, I think
there was recently some patches to swap the axes in the evdev driver.
Shouldn't all this infrastructure be in a generic layer? At least, it
would be good if all the drivers conformed to the same features,
property names, and property behaviour :-)

Last but not least, as a user, only the rotation is useful. I don't care
about "DontReportSize", "VertSpeed" and "HorizSpeed", they are just
tricks that have to be done to get the touchpad correctly behaving after
a rotation is applied. They should be computed automatically.

> The next thing would be to automatically change the orientation of the
> trackpad when XRandR rotates the screen.
Certainly not at the X server level. I have two screens, which screen's
orientation are you going to use? However, at a higher level, like in
the gnome applet for screen resolution, that would be very useful.

See you,
Eric
begin:vcard
fn;quoted-printable:=C3=89ric Piel
n;quoted-printable:Piel;=C3=89ric
org:Technical University of Delft;Software Engineering Research Group
adr:HB 08.080;;Mekelweg 4;Delft;;2628 CD;The Netherlands
email;internet:[EMAIL PROTECTED]
tel;work:+31 15 278 6338
tel;cell:+31 6 2437 9135
x-mozilla-html:FALSE
url:http://pieleric.free.fr
version:2.1
end:vcard

___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Re: Synaptics patch: orientation

2008-11-11 Thread Mildred Ki'Lya

Le Tue 11/11/2008 à 14:30 Peter Hutterer à écrit:
>
> please split the patch into 3 separate patches as grouped above. They
> are semantically different changes and shouldn't be applied in one go.
> Also, I'd prefer a git patch series over a standard diff. If you need
> help with that, just contact me off-list.
> 
> Once you've split it up, please CC me on the patch series and I'll
> have a look at them.


Well, I don't really know how to creates patch series using git. It was
easier for me to create a repository I made available on github:

git://github.com/mildred/xorg-synaptics-orientation-patch.git
http://github.com/mildred/xorg-synaptics-orientation-patch/

I also filled in extensive commit messages

Mildred


-- 
Mildred Ki'Lya
╭─ mildred593@online.fr ──
│ Jabber, GoogleTalk: <[EMAIL PROTECTED]>
│ Site:   GPG ID: 9A7D 2E2B
│ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Re: Synaptics patch: orientation

2008-11-10 Thread Peter Hutterer
On Sat, Nov 08, 2008 at 08:53:24PM +0100, Mildred Ki'Lya wrote:
patch 1
>Option "Orientation" "integer"

patch 2
>Option "DontReportSize" "boolean"

patch 3
>Option "VertSpeed" "float"
>Option "HorizSpeed" "float"

please split the patch into 3 separate patches as grouped above. They are
semantically different changes and shouldn't be applied in one go.
Also, I'd prefer a git patch series over a standard diff. If you need help
with that, just contact me off-list.

Once you've split it up, please CC me on the patch series and I'll have a look
at them.

Cheers,
  Peter
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


Synaptics patch: orientation

2008-11-08 Thread Mildred Ki'Lya
Hi,

I just finished my orientation patch for synaptics. It's not heavily
tested for the moment. If anyone could test ...

I added 4 options to the driver, quoting from the man page:

   Option "Orientation" "integer"
  This option can be used to change the orientation of the  track‐
  pad  and  can  takes  values  from  0  to 3. The default value 0
  implies a normal orientation, other values can be used  to  have
  respectively  an orientation set to the left, an inverted orien‐
  tation, and an orientation set to the right.  This may be useful
  in  combinaison with the orientation option of the XRandR exten‐
  sion. You may notice that the values used are the  same  to  the
  values  used  by  XRandR.   Along with this option, you might be
  interested to enable the DontReportSize option. Read  its  docu‐
  mentation to know why.

   Option "DontReportSize" "boolean"
  This option prevent the synaptics driver from reporting the size
  of the trackpad to  Xorg.  Xorg  can  use  this  information  to
  amplify  the  movements  in  one direction. For example, if your
  trackpad is wider than higher, Xorg will speed up your  vertical
  movements. For example, moving the mouse cursor every two pixels
  when synaptics told Xorg that there was a movement on  one  unit
  along the y axis.  This is particularly useful with the Orienta‐
  tion option which effectively swaps the axis inside  the  synap‐
  tics driver. At that time, Xorg no longer have relevant informa‐
  tion about the size of the x and y axis and might amplifying the
  movements  of the wrong axis. Causing an unusable trackpad, over
  sensitive horizontally and very slow vertically for example.

   Option "VertSpeed" "float"
  Changes the vertical speed. This is a number multiplied  by  the
  input  given  by  the  trackpad. So a value above 1 speed up the
  vertical axis, a value below 1 slows  down  the  vertical  move‐
  ments.   This  option isn't affected by the orientation, so when
  the screen is rotated using XRandR, the movements you have  with
  your  oriented trackpad will be similar to those you have with a
  non oriented trackpad and a non rotated screen.

   Option "HorizSpeed" "float"
  Changes the horizontal speed similarly to VertSpeed.






The patch is licenced under the MIT licence.

The next thing would be to automatically change the orientation of the
trackpad when XRandR rotates the screen.


Mildred

-- 
Mildred Ki'Lya
╭─ mildred593@online.fr ──
│ Jabber, GoogleTalk: <[EMAIL PROTECTED]>
│ Site:   GPG ID: 9A7D 2E2B
│ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B
diff --git a/include/synaptics.h b/include/synaptics.h
index 7e55293..77c4622 100644
--- a/include/synaptics.h
+++ b/include/synaptics.h
@@ -133,6 +133,10 @@ typedef struct _SynapticsSHM
 double press_motion_min_factor;	/* factor applied on speed when finger pressure is at minimum */
 double press_motion_max_factor; 	/* factor applied on speed when finger pressure is at minimum */
 Bool grab_event_device;		/* grab event device for exclusive use? */
+int orientation;			/* orientation of the trackpad */
+Bool dont_report_size;		/* Don't report the size of the trackpad to Xorg */
+double horiz_speed;			/* Horizontal speed for mouse movements */
+double vert_speed;			/* Vertical speed for mouse movements */
 } SynapticsSHM;
 
 /*
diff --git a/man/synaptics.man b/man/synaptics.man
index 79958e7..491a160 100644
--- a/man/synaptics.man
+++ b/man/synaptics.man
@@ -384,6 +384,47 @@ reenabled.
 .
 This can be achieved by switching to a text console and then switching
 back to X.
+.TP
+.BI "Option \*qOrientation\*q \*q" integer \*q
+This option can be used to change the orientation of the trackpad and can
+takes values from 0 to 3. The default value 0 implies a normal orientation,
+other values can be used to have respectively an orientation set to the
+left, an inverted orientation, and an orientation set to the right.
+This may be useful in combinaison with the orientation option of the XRandR
+extension. You may notice that the values used are the same to the values
+used by XRandR.
+.
+Along with this option, you might be interested to enable the DontReportSize
+option. Read its documentation to know why.
+.
+.TP
+.BI "Option \*qDontReportSize\*q \*q" boolean \*q
+This option prevent the synaptics driver from reporting the size of the trackpad
+to Xorg. Xorg can use this information to amplify the movements in one
+direction. For example, if your trackpad is wider than higher, X