mirror of
https://github.com/X11Libre/xf86-input-synaptics.git
synced 2026-03-24 01:34:04 +00:00
Properties: Generalise InitTypedAtom from InitAtom
Add InitTypedAtom, which does exactly the same thing as InitAtom, but
takes an additional type argument.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit 627b09e5bd)
This commit is contained in:
committed by
Peter Hutterer
parent
a85e2926b5
commit
75550077e6
@@ -96,7 +96,8 @@ Atom prop_product_id = 0;
|
||||
Atom prop_device_node = 0;
|
||||
|
||||
static Atom
|
||||
InitAtom(DeviceIntPtr dev, char *name, int format, int nvalues, int *values)
|
||||
InitTypedAtom(DeviceIntPtr dev, char *name, Atom type, int format, int nvalues,
|
||||
int *values)
|
||||
{
|
||||
int i;
|
||||
Atom atom;
|
||||
@@ -124,13 +125,18 @@ InitAtom(DeviceIntPtr dev, char *name, int format, int nvalues, int *values)
|
||||
}
|
||||
|
||||
atom = MakeAtom(name, strlen(name), TRUE);
|
||||
XIChangeDeviceProperty(dev, atom, XA_INTEGER, format,
|
||||
PropModeReplace, nvalues,
|
||||
XIChangeDeviceProperty(dev, atom, type, format, PropModeReplace, nvalues,
|
||||
converted, FALSE);
|
||||
XISetDevicePropertyDeletable(dev, atom, FALSE);
|
||||
return atom;
|
||||
}
|
||||
|
||||
static Atom
|
||||
InitAtom(DeviceIntPtr dev, char *name, int format, int nvalues, int *values)
|
||||
{
|
||||
return InitTypedAtom(dev, name, XA_INTEGER, format, nvalues, values);
|
||||
}
|
||||
|
||||
static Atom
|
||||
InitFloatAtom(DeviceIntPtr dev, char *name, int nvalues, float *values)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user