Commit 6ac05729 authored by Alexandr Shadchin's avatar Alexandr Shadchin Committed by Peter Hutterer

Simplified mechanism for determining default size

Now SynapticsDefaultDimensions() called only once
Signed-off-by: default avatarAlexandr Shadchin <Alexandr.Shadchin@gmail.com>
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 3c598dae
......@@ -233,5 +233,5 @@ struct SynapticsProtocolOperations alps_proto_operations = {
ALPSQueryHardware,
ALPSReadHwState,
ALPSAutoDevProbe,
SynapticsDefaultDimensions
NULL
};
......@@ -672,5 +672,5 @@ struct SynapticsProtocolOperations psaux_proto_operations = {
PS2QueryHardware,
PS2ReadHwState,
PS2AutoDevProbe,
SynapticsDefaultDimensions
NULL
};
......@@ -181,5 +181,5 @@ struct SynapticsProtocolOperations psm_proto_operations = {
PSMQueryHardware,
PSMReadHwState,
PSMAutoDevProbe,
SynapticsDefaultDimensions
NULL
};
......@@ -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
......
......@@ -243,7 +243,4 @@ typedef struct _SynapticsPrivateRec
enum TouchpadModel model; /* The detected model */
} SynapticsPrivate;
extern void SynapticsDefaultDimensions(InputInfoPtr pInfo);
#endif /* _SYNAPTICSSTR_H_ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment