building linuxwacom against current xorg git

View: New views
9 Messages — Rating Filter:   Alert me  

building linuxwacom against current xorg git

by Andy Neitzke-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Is there a version of linuxwacom which can be built against current xorg git?  
There seem to have been a few changes to the header files which prevent
linuxwacom-0.8.3-5 from compiling.  The two changes that I know about are an
extra argument in 'InitValuatorAxisStruct' and the removal of the
symbol 'curKeySyms'.

(I tried making the most naive possible changes to linuxwacom to keep up with
the new interfaces, but then xorg hangs at startup; so I guess that in
addition to the interface changes there may be other issues which have to be
considered by someone more knowledgeable.)

Best, and thanks in advance for any information,

-Andy

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@...
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Re: building linuxwacom against current xorg git

by Thomas Jaeger-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have the driver working already, I'll post a patch soon.

Tom

On Thu, Jun 18, 2009 at 5:09 PM, Andy
Neitzke<neitzke@...> wrote:

> Hi,
>
> Is there a version of linuxwacom which can be built against current xorg git?
> There seem to have been a few changes to the header files which prevent
> linuxwacom-0.8.3-5 from compiling.  The two changes that I know about are an
> extra argument in 'InitValuatorAxisStruct' and the removal of the
> symbol 'curKeySyms'.
>
> (I tried making the most naive possible changes to linuxwacom to keep up with
> the new interfaces, but then xorg hangs at startup; so I guess that in
> addition to the interface changes there may be other issues which have to be
> considered by someone more knowledgeable.)
>
> Best, and thanks in advance for any information,
>
> -Andy
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Linuxwacom-devel mailing list
> Linuxwacom-devel@...
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
>

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@...
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Re: building linuxwacom against current xorg git

by Thomas Jaeger-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This is the patch that I've been using.  Notice that there are still a
few TODO comments where I wasn't sure how the wacom driver's axes
correspond to the axis names defined in xorg/xserver-properties.h.

Tom

Andy Neitzke wrote:

> Hi,
>
> Is there a version of linuxwacom which can be built against current xorg git?  
> There seem to have been a few changes to the header files which prevent
> linuxwacom-0.8.3-5 from compiling.  The two changes that I know about are an
> extra argument in 'InitValuatorAxisStruct' and the removal of the
> symbol 'curKeySyms'.
>
> (I tried making the most naive possible changes to linuxwacom to keep up with
> the new interfaces, but then xorg hangs at startup; so I guess that in
> addition to the interface changes there may be other issues which have to be
> considered by someone more knowledgeable.)
>
> Best, and thanks in advance for any information,
>
> -Andy

diff -Nru linuxwacom-0.8.3-5/src/xdrv/wcmCommon.c linuxwacom/src/xdrv/wcmCommon.c
--- linuxwacom-0.8.3-5/src/xdrv/wcmCommon.c 2009-05-22 16:01:33.000000000 -0400
+++ linuxwacom/src/xdrv/wcmCommon.c 2009-06-19 14:43:05.000000000 -0400
@@ -19,6 +19,7 @@
 
 #include "xf86Wacom.h"
 #include "../include/Xwacom.h"
+#include <X11/extensions/XKBsrv.h>
 
 /*
 #if XF86_VERSION_MAJOR < 4
@@ -393,7 +394,7 @@
  int i, j, alt_keysym = 0;
 
  /* Now that we have the keycode look for key index */
- KeySymsRec *ksr = &keydev->key->curKeySyms;
+ KeySymsRec *ksr = keydev->key->xkbInfo->desc;
 
  for (i = ksr->minKeyCode; i <= ksr->maxKeyCode; i++)
  if (ksr->map [(i - ksr->minKeyCode) * ksr->mapWidth] == keysym)
diff -Nru linuxwacom-0.8.3-5/src/xdrv/xf86Wacom.c linuxwacom/src/xdrv/xf86Wacom.c
--- linuxwacom-0.8.3-5/src/xdrv/xf86Wacom.c 2009-05-22 16:01:33.000000000 -0400
+++ linuxwacom/src/xdrv/xf86Wacom.c 2009-06-19 14:43:05.000000000 -0400
@@ -88,6 +88,11 @@
 #include "xf86Wacom.h"
 #include "wcmFilter.h"
 
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
+#include <X11/Xatom.h>
+#include <xserver-properties.h>
+#endif
+
 static int xf86WcmDevOpen(DeviceIntPtr pWcm);
 static void xf86WcmDevReadInput(LocalDevicePtr local);
 static void xf86WcmDevControlProc(DeviceIntPtr device, PtrCtrl* ctrl);
@@ -396,8 +401,11 @@
  resolution = (int)((double)resolution * priv->factorX + 0.5);
 #endif
 
- InitValuatorAxisStruct(local->dev, 0, topx, bottomx,
- resolution, 0, resolution);
+ InitValuatorAxisStruct(local->dev, 0,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+ XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X),
+#endif
+ topx, bottomx, resolution, 0, resolution);
  }
  else /* y ax */
  {
@@ -420,8 +428,11 @@
  resolution = (int)((double)resolution * priv->factorY + 0.5);
 #endif
 
- InitValuatorAxisStruct(local->dev, 1, topy, bottomy,
- resolution, 0, resolution);
+ InitValuatorAxisStruct(local->dev, 1,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+ XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y),
+#endif
+ topy, bottomy, resolution, 0, resolution);
  }
  return;
 }
@@ -618,6 +629,32 @@
  return;
 }
 
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+static void xf86WcmInitButtonLabels(Atom *labels, int nlabels)
+{
+    memset(labels, 0, nlabels * sizeof(Atom));
+    switch(nlabels)
+    {
+        default:
+        case 7:
+            labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT);
+        case 6:
+            labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT);
+        case 5:
+            labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN);
+        case 4:
+            labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP);
+        case 3:
+            labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT);
+        case 2:
+            labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE);
+        case 1:
+            labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT);
+            break;
+    }
+}
+#endif
+
 /*****************************************************************************
  * xf86WcmRegisterX11Devices --
  *    Register the X11 input devices with X11 core.
@@ -630,6 +667,9 @@
  CARD8 butmap[MAX_BUTTONS+1];
  int nbaxes, nbbuttons, nbkeys;
  int loop;
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+ Atom *axis_labels, *btn_labels;
+#endif
 
  /* Detect tablet configuration, if possible */
  if (priv->common->wcmModel->DetectConfig)
@@ -645,6 +685,11 @@
                  * nbbuttons = 0 while sending a beep
                  * This is only a workaround.
          */
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+ axis_labels = xcalloc(nbaxes, sizeof(Atom));
+ btn_labels = xcalloc(nbbuttons, sizeof(Atom));
+ xf86WcmInitButtonLabels(btn_labels, nbbuttons);
+#endif
 
  DBG(10, priv->debugLevel, ErrorF("xf86WcmRegisterX11Devices "
  "(%s) %d buttons, %d keys, %d axes\n",
@@ -656,8 +701,19 @@
  for(loop=1; loop<=nbbuttons; loop++)
  butmap[loop] = loop;
 
- if (InitButtonClassDeviceStruct(local->dev, nbbuttons, butmap) == FALSE)
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+ btn_labels = xcalloc(nbbuttons, sizeof(Atom));
+ xf86WcmInitButtonLabels(btn_labels, nbbuttons);
+#endif
+ if (InitButtonClassDeviceStruct(local->dev, nbbuttons,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+ btn_labels,
+#endif
+ butmap) == FALSE)
  {
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+ xfree(btn_labels);
+#endif
  ErrorF("unable to allocate Button class device\n");
  return FALSE;
  }
@@ -685,6 +741,9 @@
  nbaxes = priv->naxes = 6;
 
  if (InitValuatorClassDeviceStruct(local->dev, nbaxes,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+  axis_labels,
+#endif
 #if WCM_XINPUTABI_MAJOR == 0
   xf86GetMotionEvents,
   local->history_size,
@@ -776,14 +835,25 @@
  xf86WcmRotateTablet(local, common->wcmRotate);
 
  /* pressure */
- InitValuatorAxisStruct(local->dev, 2, 0,
- common->wcmMaxZ, 1, 1, 1);
+ InitValuatorAxisStruct(local->dev, 2,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+ XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE),
+#endif
+       0, common->wcmMaxZ, 1, 1, 1);
 
  if (IsCursor(priv))
  {
  /* z-rot and throttle */
- InitValuatorAxisStruct(local->dev, 3, -900, 899, 1, 1, 1);
- InitValuatorAxisStruct(local->dev, 4, -1023, 1023, 1, 1, 1);
+ InitValuatorAxisStruct(local->dev, 3,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+ XIGetKnownProperty(AXIS_LABEL_PROP_ABS_RZ),
+#endif
+ -900, 899, 1, 1, 1);
+ InitValuatorAxisStruct(local->dev, 4,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+ XIGetKnownProperty(AXIS_LABEL_PROP_ABS_THROTTLE),
+#endif
+ -1023, 1023, 1, 1, 1);
  }
  else if (IsPad(priv))
  {
@@ -791,15 +861,31 @@
  if (strstr(common->wcmModel->name, "Intuos3") ||
  strstr(common->wcmModel->name, "CintiqV5"))
  {
- InitValuatorAxisStruct(local->dev, 3, 0, common->wcmMaxStripX, 1, 1, 1);
- InitValuatorAxisStruct(local->dev, 4, 0, common->wcmMaxStripY, 1, 1, 1);
+ InitValuatorAxisStruct(local->dev, 3,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+ XIGetKnownProperty(AXIS_LABEL_PROP_ABS_HAT0X), // TODO
+#endif
+ 0, common->wcmMaxStripX, 1, 1, 1);
+ InitValuatorAxisStruct(local->dev, 4,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+ XIGetKnownProperty(AXIS_LABEL_PROP_ABS_HAT0Y), // TODO
+#endif
+ 0, common->wcmMaxStripY, 1, 1, 1);
  }
  }
  else
  {
  /* tilt-x and tilt-y */
- InitValuatorAxisStruct(local->dev, 3, -64, 63, 1, 1, 1);
- InitValuatorAxisStruct(local->dev, 4, -64, 63, 1, 1, 1);
+ InitValuatorAxisStruct(local->dev, 3,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+ XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_X),
+#endif
+ -64, 63, 1, 1, 1);
+ InitValuatorAxisStruct(local->dev, 4,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+ XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_Y),
+#endif
+ -64, 63, 1, 1, 1);
  }
 
  if ((strstr(common->wcmModel->name, "Intuos3") ||
@@ -807,16 +893,28 @@
  strstr(common->wcmModel->name, "Intuos4"))
  && IsStylus(priv))
  /* Art Marker Pen rotation */
- InitValuatorAxisStruct(local->dev, 5, -900, 899, 1, 1, 1);
+ InitValuatorAxisStruct(local->dev, 5,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+ XIGetKnownProperty(AXIS_LABEL_PROP_ABS_RZ), // TODO
+#endif
+ -900, 899, 1, 1, 1);
  else if ((strstr(common->wcmModel->name, "Bamboo") ||
  strstr(common->wcmModel->name, "Intuos4"))
  && IsPad(priv))
  /* Touch ring */
- InitValuatorAxisStruct(local->dev, 5, 0, 71, 1, 1, 1);
+ InitValuatorAxisStruct(local->dev, 5,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+ XIGetKnownProperty(AXIS_LABEL_PROP_ABS_MISC), // TODO
+#endif
+ 0, 71, 1, 1, 1);
  else
  {
  /* absolute wheel */
- InitValuatorAxisStruct(local->dev, 5, 0, 1023, 1, 1, 1);
+ InitValuatorAxisStruct(local->dev, 5,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+ XIGetKnownProperty(AXIS_LABEL_PROP_ABS_WHEEL),
+#endif
+ 0, 1023, 1, 1, 1);
  }
 
  if (IsTouch(priv))

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@...
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Re: building linuxwacom against current xorg git

by Andy Neitzke-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> This is the patch that I've been using.  Notice that there are still a
> few TODO comments where I wasn't sure how the wacom driver's axes
> correspond to the axis names defined in xorg/xserver-properties.h.

Thanks for posting that!

For some reason, it's not working properly for me:  if I start xorg with the
linuxwacom driver installed, I get a black screen (except for a cursor _ at
the upper left).  The machine doesn't respond to any keyboard or mouse input
but it is still running (I can ssh into it just fine).

Does any expert have an idea about how one might debug it?

The machine is a Thinkpad X60t.  My xorg.conf (which did work with xorg-server
1.6.1.901) contains:

Section "InputDevice"
  Driver        "wacom"
  Identifier    "stylus"
  Option        "Device"        "/dev/ttyS0"  
  Option        "Type"          "stylus"
  Option        "ForceDevice"   "ISDV4"
  Option        "KeepShape"     "on"
  Option        "DebugLevel"    "10"
EndSection

(and similar sections for "cursor" and "eraser" devices, but the problem still
occurs even if I comment those out).  I am using the xf86-video-intel driver
and KMS (but the problem seems to occur also without KMS).

When it fails, the end of Xorg.0.log says:

(**) Option "SendCoreEvents"
(**) stylus: always reports core events
(**) stylus device is /dev/ttyS0
(**) Option "DebugLevel" "10"
(**) WACOM: stylus debug level set to 10
(**) stylus is in absolute mode
(**) stylus: forcing TabletPC ISD V4 protocol
(**) WACOM: suppress value is 2
(**) Option "KeepShape" "on"
(**) stylus: keeps shape
(**) /dev/ttyS0: Tablet PC buttons are on
(**) Option "BaudRate" "9600"
(**) stylus: serial speed 9600
(II) XINPUT: Adding extended input device "stylus" (type: Wacom Stylus)
BEGIN xf86WcmProc dev=0xd58820 priv=0xd4cc00 type=stylus(stylus) flags=17153
fd=-1 what=INIT
xf86WcmDevOpen
opening /dev/ttyS0
(**) Option "Device" "/dev/ttyS0"
(**) Option "StopBits" "1"
(**) Option "DataBits" "8"
(**) Option "Parity" "None"
(**) Option "Vmin" "1"
(**) Option "Vtime" "10"
(**) Option "FlowControl" "Xoff"
usbDetect
usbDetect: can not ioctl version
initializing ISDV4 tablet
getting ISDV4 Ranges
Querying ISDV4 tablet
Querying ISDV4 tablet
isdv4GetRanges speed=19200 maxX=24576 maxY=18432 maxZ=255 TouchresX=0
TouchresY=0
(==) Wacom using pressure threshold of 15 for button 1
(==) Wacom General ISDV4 tablet speed=9600 (19200) maxX=24576 maxY=18432
maxZ=255 resX=2540 resY=2540  tilt=disabled
xf86WcmRegisterX11Devices (stylus) 32 buttons, 32 keys, 6 axes



Best and thanks again,

-Andy


------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@...
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Re: building linuxwacom against current xorg git

by Andy Neitzke-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 19 June 2009 5:48:26 pm Andy Neitzke wrote:

> > This is the patch that I've been using.  Notice that there are still a
> > few TODO comments where I wasn't sure how the wacom driver's axes
> > correspond to the axis names defined in xorg/xserver-properties.h.
>
> Thanks for posting that!
>
> For some reason, it's not working properly for me:  if I start xorg with
> the linuxwacom driver installed, I get a black screen (except for a cursor
> _ at the upper left).  The machine doesn't respond to any keyboard or mouse
> input but it is still running (I can ssh into it just fine).

Now I understand the problem a bit better:  Xorg is actually failing, with the
error

/usr/bin/X: symbol lookup error: /usr/lib64/xorg/modules/input/wacom_drv.so:
undefined symbol: InitKeyClassDeviceStruct

It looks to me as if this function was removed from input.h in xorg-server
commit 08363c5830bdea34012dcd954b45ccfdc79a3a7e ("Input: Overhaul keyboard
initialisation process").

-Andy


------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@...
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Re: building linuxwacom against current xorg git

by Thomas Jaeger-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I see.  Someone will need to port keyboard input to Xkb.  Since I don't
use this feature of the driver, I just disabled it in configure.in (see
the attached patch).

Tom

Andy Neitzke wrote:

> On Friday 19 June 2009 5:48:26 pm Andy Neitzke wrote:
>>> This is the patch that I've been using.  Notice that there are still a
>>> few TODO comments where I wasn't sure how the wacom driver's axes
>>> correspond to the axis names defined in xorg/xserver-properties.h.
>> Thanks for posting that!
>>
>> For some reason, it's not working properly for me:  if I start xorg with
>> the linuxwacom driver installed, I get a black screen (except for a cursor
>> _ at the upper left).  The machine doesn't respond to any keyboard or mouse
>> input but it is still running (I can ssh into it just fine).
>
> Now I understand the problem a bit better:  Xorg is actually failing, with the
> error
>
> /usr/bin/X: symbol lookup error: /usr/lib64/xorg/modules/input/wacom_drv.so:
> undefined symbol: InitKeyClassDeviceStruct
>
> It looks to me as if this function was removed from input.h in xorg-server
> commit 08363c5830bdea34012dcd954b45ccfdc79a3a7e ("Input: Overhaul keyboard
> initialisation process").
>
> -Andy
>

--- wacom-tools-0.8.3.2.orig/linuxwacom/configure.in
+++ wacom-tools-0.8.3.2/linuxwacom/configure.in
@@ -306,25 +306,6 @@
  fi
  if test "$WCM_ENV_XFREE86" = "yes"; then
  WCM_XDRIVER_QUIRKS="$WCM_XDRIVER_QUIRKS libc-wrapper"
-
- dnl Xfree86 > 4.2 support sending keyevents
- AC_MSG_CHECKING([if XFree86 support sending keys])
- save_CFLAGS="$CFLAGS"
- CFLAGS="-I$WCM_XFREE86_DIR $CFLAGS"
- AC_TRY_COMPILE([
-#include <programs/Xserver/hw/xfree86/xf86Version.h>
-#if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4, 3, 0, 0, 0)
-# error "XFree86 < 4.3 doesn't support sending keys"
-#endif
-], , [WCM_SEND_KEYS=yes], [WCM_SEND_KEYS=no])
- CFLAGS="$save_CFLAGS"
- AC_MSG_RESULT($WCM_SEND_KEYS)
- if test "$WCM_SEND_KEYS" = "yes"; then
- WCM_XDRIVER_QUIRKS="$WCM_XDRIVER_QUIRKS key-events"
- AC_DEFINE(WCM_KEY_SENDING_SUPPORT, 1,
- [The X-driver can send key events for a button])
- fi
-
  dnl Only Xorg has progressed >= 1.0
  AC_DEFINE(WCM_XINPUTABI_MAJOR, 0,
  [Slightly diffent abi in XINPUT >= 1.0])
@@ -484,9 +465,6 @@
  [IsXExtensionPointer is only defined in later X.org releases])
  fi
 
- dnl All X.org versions support sending key-events
- AC_DEFINE(WCM_KEY_SENDING_SUPPORT, 1,
- [The X-driver can send key events for a button])
  WCM_XDRIVER_QUIRKS="$WCM_XDRIVER_QUIRKS key-events"
 
  AC_MSG_CHECKING([if Xorg SDK defines dixScreenOrigins])

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@...
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Re: building linuxwacom against current xorg git

by Thomas Jaeger-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think this should do it.

Tom

Andy Neitzke wrote:

> On Friday 19 June 2009 5:48:26 pm Andy Neitzke wrote:
>>> This is the patch that I've been using.  Notice that there are still a
>>> few TODO comments where I wasn't sure how the wacom driver's axes
>>> correspond to the axis names defined in xorg/xserver-properties.h.
>> Thanks for posting that!
>>
>> For some reason, it's not working properly for me:  if I start xorg with
>> the linuxwacom driver installed, I get a black screen (except for a cursor
>> _ at the upper left).  The machine doesn't respond to any keyboard or mouse
>> input but it is still running (I can ssh into it just fine).
>
> Now I understand the problem a bit better:  Xorg is actually failing, with the
> error
>
> /usr/bin/X: symbol lookup error: /usr/lib64/xorg/modules/input/wacom_drv.so:
> undefined symbol: InitKeyClassDeviceStruct
>
> It looks to me as if this function was removed from input.h in xorg-server
> commit 08363c5830bdea34012dcd954b45ccfdc79a3a7e ("Input: Overhaul keyboard
> initialisation process").
>
> -Andy
>

--- linuxwacom-0.8.3-5/src/xdrv/xf86Wacom.c 2009-06-22 12:16:42.000000000 -0400
+++ linuxwacom/src/xdrv/xf86Wacom.c 2009-06-22 12:09:09.000000000 -0400
@@ -438,6 +438,7 @@
 }
 
 #ifdef WCM_KEY_SENDING_SUPPORT
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 7
 /*****************************************************************************
  * xf86WcmRegisterX11Devices --
  *    Register the X11 input devices with X11 core.
@@ -585,6 +586,7 @@
  { XK_Mode_switch, Mod3Mask }, /*AltMask*/
  { NoSymbol, 0 }
 };
+#endif
 #endif /* WCM_KEY_SENDING_SUPPORT */
 
 /*****************************************************************************
@@ -768,6 +770,7 @@
 #ifdef WCM_KEY_SENDING_SUPPORT
  if (nbkeys)
  {
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 7
  KeySymsRec wacom_keysyms;
  CARD8 modmap[MAP_LENGTH];
  int i,j;
@@ -798,6 +801,9 @@
  wacom_keysyms.maxKeyCode = 255;
  wacom_keysyms.mapWidth = 2;
  if (InitKeyClassDeviceStruct(local->dev, &wacom_keysyms, modmap) == FALSE)
+#else
+ if (!InitKeyboardDeviceStruct(local->dev, NULL, xf86WcmBellCallback, xf86WcmKbdCtrlCallback))
+#endif
  {
  ErrorF("unable to init key class device\n");
  return FALSE;
@@ -805,11 +811,13 @@
  }
 
 #ifndef WCM_XFREE86
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 7
  if(InitKbdFeedbackClassDeviceStruct(local->dev, xf86WcmBellCallback,
  xf86WcmKbdCtrlCallback) == FALSE) {
  ErrorF("unable to init kbd feedback device struct\n");
  return FALSE;
  }
+#endif
 
  if(InitLedFeedbackClassDeviceStruct (local->dev, xf86WcmKbdLedCallback) == FALSE) {
  ErrorF("unable to init led feedback device struct\n");

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@...
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Re: building linuxwacom against current xorg git

by Andy Neitzke-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I think this should do it.

OK, that works almost perfectly -- I can build the driver against today's git
master.  There is one small glitch remaining:  if I move the cursor using the
pen and then move it using the mouse, the pointer "warps" to the lower right
corner of the screen.

Best,

-Andy


------------------------------------------------------------------------------
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@...
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Re: building linuxwacom against current xorg git

by Andy Neitzke-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> There is one small glitch remaining:  if I move the cursor using the
> pen and then move it using the mouse, the pointer "warps" to the lower
> right corner of the screen.

I bisected this down -- the first commit that exhibits this problem for me is
5cbd4d3d6e54d202ecdbb527b57aaefeb8435600
("dix: do away with an instance of temporary in-place modification").

-Andy


------------------------------------------------------------------------------
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@...
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel