diff options
author | Alexandr Shadchin <alexandr.shadchin@gmail.com> | 2011-02-28 16:38:20 +0500 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-03-01 11:53:39 +1000 |
commit | 6ac0572951fa7883bbbe781884cdade2c4537760 (patch) | |
tree | 5c93c78b6007faa95af4f2b12d1527df1760a7d6 /src | |
parent | 3c598daec845ff6ef4ba0769ad78a0d562effe29 (diff) |
Simplified mechanism for determining default size
Now SynapticsDefaultDimensions() called only once
Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/alpscomm.c | 2 | ||||
-rw-r--r-- | src/ps2comm.c | 2 | ||||
-rw-r--r-- | src/psmcomm.c | 2 | ||||
-rw-r--r-- | src/synaptics.c | 6 | ||||
-rw-r--r-- | src/synapticsstr.h | 3 |
5 files changed, 7 insertions, 8 deletions
diff --git a/src/alpscomm.c b/src/alpscomm.c index 84d2136..c5af681 100644 --- a/src/alpscomm.c +++ b/src/alpscomm.c @@ -233,5 +233,5 @@ struct SynapticsProtocolOperations alps_proto_operations = { ALPSQueryHardware, ALPSReadHwState, ALPSAutoDevProbe, - SynapticsDefaultDimensions + NULL }; diff --git a/src/ps2comm.c b/src/ps2comm.c index 4e372b3..a34613e 100644 --- a/src/ps2comm.c +++ b/src/ps2comm.c @@ -672,5 +672,5 @@ struct SynapticsProtocolOperations psaux_proto_operations = { PS2QueryHardware, PS2ReadHwState, PS2AutoDevProbe, - SynapticsDefaultDimensions + NULL }; diff --git a/src/psmcomm.c b/src/psmcomm.c index 741cd1d..903e6dd 100644 --- a/src/psmcomm.c +++ b/src/psmcomm.c @@ -181,5 +181,5 @@ struct SynapticsProtocolOperations psm_proto_operations = { PSMQueryHardware, PSMReadHwState, PSMAutoDevProbe, - SynapticsDefaultDimensions + NULL }; diff --git a/src/synaptics.c b/src/synaptics.c index a7dd566..1f5b68c 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -130,6 +130,7 @@ static Bool QueryHardware(InputInfoPtr); static void ReadDevDimensions(InputInfoPtr); static void ScaleCoordinates(SynapticsPrivate *priv, struct SynapticsHwState *hw); static void CalculateScalingCoeffs(SynapticsPrivate *priv); +static void SynapticsDefaultDimensions(InputInfoPtr pInfo); void InitDeviceProperties(InputInfoPtr pInfo); int SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, @@ -183,7 +184,7 @@ _X_EXPORT XF86ModuleData synapticsModuleData = { * The default values 1900, etc. come from the dawn of time, when men where * men, or possibly apes. */ -void +static void SynapticsDefaultDimensions(InputInfoPtr pInfo) { SynapticsPrivate *priv = (SynapticsPrivate *)pInfo->private; @@ -444,7 +445,6 @@ static void set_default_parameters(InputInfoPtr pInfo) * If the range was autodetected, apply these edge widths to all four * sides. */ - SynapticsDefaultDimensions(pInfo); width = abs(priv->maxx - priv->minx); height = abs(priv->maxy - priv->miny); @@ -2613,6 +2613,8 @@ ReadDevDimensions(InputInfoPtr pInfo) if (priv->proto_ops->ReadDevDimensions) priv->proto_ops->ReadDevDimensions(pInfo); + + SynapticsDefaultDimensions(pInfo); } static Bool diff --git a/src/synapticsstr.h b/src/synapticsstr.h index 066b3f3..8f6593e 100644 --- a/src/synapticsstr.h +++ b/src/synapticsstr.h @@ -243,7 +243,4 @@ typedef struct _SynapticsPrivateRec enum TouchpadModel model; /* The detected model */ } SynapticsPrivate; - -extern void SynapticsDefaultDimensions(InputInfoPtr pInfo); - #endif /* _SYNAPTICSSTR_H_ */ |