On Sat, Jun 04, 2011 at 07:53:24PM +0200, Andrzej Giniewicz wrote:
> with current git I'm getting error during build:
> 
> ../src/wcmXCommand.c: In function 'InitWcmDeviceProperties':
> ../src/wcmXCommand.c:156:26: error: 'XI_PROP_DEVNODE' undeclared
> (first use in this function)
> ../src/wcmXCommand.c:156:26: note: each undeclared identifier is
> reported only once for each function it appears in
> 
> I guess it's related to this patch, or more exactly to this patch:
> 
> http://linuxwacom.git.sourceforge.net/git/gitweb.cgi?p=linuxwacom/xf86-input-wacom;a=blobdiff;f=src/wcmXCommand.c;h=12ebe5da87f62939c73ed8231634b82d030282bb;hp=20e87af2d0e6e5778e0feabc32943f89f315c17e;hb=2e9972c4419cef47ac08528bbaf02846ae4fc915;hpb=8713d0c90b994b259f7c0430ac4726884c7e3d10
> 
> Probably XI_PROP_DEVNODE has been renamed to XI_PROP_DEVICE_NODE in
> one place while left unmodified in place where it was used?

oops. sorry, lack of sleep and coffee, a deadly combination. I pushed a fix
for this yesterday, this should all work now again.

Cheers,
  Peter

> 
> On Fri, Jun 3, 2011 at 1:10 AM, Peter Hutterer <[email protected]> 
> wrote:
> > On Thu, Jun 02, 2011 at 12:44:10PM +1000, Peter Hutterer wrote:
> >> X doesn't provide a mapping between physical devices and X device IDs other
> >> than what can be extrapolated from the device name.
> >> Export the device node so clients that need e.g. sysfs or other information
> >> from the kernel can map the devices.
> >>
> >> Signed-off-by: Peter Hutterer <[email protected]>
> >> ---
> >
> > I should note that I had a typo in the patch, the server's define is
> > XI_PROP_DEVICE_NODE, not XI_PROP_DEVNODE. I fixed this up locally but it had
> > no effect on its working otherwise since the _name_ of the property was
> > identical. Even if we had ended up using two different defines, the only
> > result would have been that the cpp gets a bit more exercise.
> >
> > Cheers,
> >  Peter
> >
> >>  src/wcmXCommand.c |   15 ++++++++++++++-
> >>  1 files changed, 14 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c
> >> index 20e87af..65854b0 100644
> >> --- a/src/wcmXCommand.c
> >> +++ b/src/wcmXCommand.c
> >> @@ -26,6 +26,10 @@
> >>  #include <exevents.h>
> >>  #include <xf86_OSproc.h>
> >>
> >> +#ifndef XI_PROP_DEVNODE
> >> +#define XI_PROP_DEVNODE "Device Node"
> >> +#endif
> >> +
> >>  static void wcmBindToSerial(InputInfoPtr pInfo, unsigned int serial);
> >>
> >>  /*****************************************************************************
> >> @@ -72,6 +76,7 @@ int wcmDevSwitchMode(ClientPtr client, DeviceIntPtr dev, 
> >> int mode)
> >>       return wcmDevSwitchModeCall(pInfo, mode);
> >>  }
> >>
> >> +Atom prop_devnode;
> >>  Atom prop_rotation;
> >>  Atom prop_tablet_area;
> >>  Atom prop_pressurecurve;
> >> @@ -144,6 +149,12 @@ void InitWcmDeviceProperties(InputInfoPtr pInfo)
> >>
> >>       DBG(10, priv, "\n");
> >>
> >> +     prop_devnode = MakeAtom(XI_PROP_DEVNODE, strlen(XI_PROP_DEVNODE), 
> >> TRUE);
> >> +     XIChangeDeviceProperty(pInfo->dev, prop_devnode, XA_STRING, 8,
> >> +                             PropModeReplace, strlen(common->device_path),
> >> +                             common->device_path, FALSE);
> >> +     XISetDevicePropertyDeletable(pInfo->dev, prop_devnode, FALSE);
> >> +
> >>       if (!IsPad(priv)) {
> >>               values[0] = priv->topX;
> >>               values[1] = priv->topY;
> >> @@ -597,7 +608,9 @@ int wcmSetProperty(DeviceIntPtr dev, Atom property, 
> >> XIPropertyValuePtr prop,
> >>
> >>       DBG(10, priv, "\n");
> >>
> >> -     if (property == prop_tablet_area)
> >> +     if (property == prop_devnode)
> >> +             return BadValue; /* Read-only */
> >> +     else if (property == prop_tablet_area)
> >>       {
> >>               INT32 *values = (INT32*)prop->data;
> >>
> >> --
> >> 1.7.5.1
> >>
> >
> > ------------------------------------------------------------------------------
> > Simplify data backup and recovery for your virtual environment with vRanger.
> > Installation's a snap, and flexible recovery options mean your data is safe,
> > secure and there when you need it. Discover what all the cheering's about.
> > Get your free trial download today.
> > http://p.sf.net/sfu/quest-dev2dev2
> > _______________________________________________
> > Linuxwacom-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
> >
> 

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to