VectorLinux

The nuts and bolts => Hardware & Drivers => Topic started by: blurymind on December 23, 2007, 04:03:53 am

Title: trying to install wacom drivers - Resolved (via a patch in wine)
Post by: blurymind on December 23, 2007, 04:03:53 am
trying to install linuxwacom:
http://linuxwacom.sourceforge.net/index.php/dl
tried with
linuxwacom-0.7.8-3.tar.bz2   -   2007-08-15   Supports new tablet, Bamboo. Provides prebuilt Wacom X driver and its utility programs for x86_32 and x86_64 systems. Adds many new xsetwacom options.
linuxwacom-0.7.6-4.tar.bz2   -   2006-12-01   Updated xsetwacom and support kernel 2.6.17/18, Intuos3 4x6 and on-the-fly tablet rotation.

./configure --enable-wacom
make fails:
Quote
In file included from /usr/include/xorg/regionstr.h:53,
                 from /usr/include/xorg/region.h:51,
                 from /usr/include/xorg/window.h:52,
                 from /usr/include/xorg/input.h:55,
                 from /usr/include/xorg/xf86str.h:38,
                 from /usr/include/xorg/xf86.h:45,
                 from ./xf86Wacom.h:66,
                 from ./xf86Wacom.c:65:
/usr/include/xorg/miscstruct.h:54:20: error: pixman.h: No such file or directory
make[3]: *** [xf86Wacom.o] Error 1
make[3]: Leaving directory `/home/aqui/Downloads/downloads-crap/compile/linuxwacom-0.7.6-4/src/xdrv'

any risk idea what to do? Do i have to recompile libpixman?
Title: Re: trying to install wacom drivers- make fails
Post by: blurymind on December 23, 2007, 05:14:07 am
compiled and installed libpixman1 and managed to compile 0.7.6.4 and did what this howto says:
http://www.linuxquestions.org/questions/slackware-14/wacom-graphire3-setup-with-slack-12-586784/page2.html

It still cant load the module:

Quote
(II) LoadModule: "wacom"
(II) Loading /usr/lib/xorg/modules/input//wacom_drv.so
(II) Module wacom: vendor="X.Org Foundation"
   compiled for 4.3.99.902, module version = 1.0.0
   Module class: X.Org XInput Driver
   ABI class: X.Org XInput driver, version 0.5
(EE) module ABI major version (0) doesn't match the server's version (2)
(II) UnloadModule: "wacom"
(II) Unloading /usr/lib/xorg/modules/input//wacom_drv.so
(EE) Failed to load module "wacom" (module requirement mismatch, 0)

seems like vector doesnt like wacoms
i tried editing xorg.conf,rebooted many times, even rebuilt nvidia drivers (latest) -no luck.. If i cant get the wacom to work,i'll have to find another distro for this machine (sadly)  :(

its extremely sad that we dont have a prebuilt package like most major distros do. There you just apt-get or urpmi it and edit xorg.conf. This is a major pain in the neck.
I really wanted to manage installing it and making a package or a howto,so others and i wouldnt have to go through it every time. :-\

I think something didnt built quite right with that libpixman. It doesnt want to build at all with the one from the repo.

many distros come with these drivers on the install cd by default.
Title: Re: trying to install wacom drivers- make fails
Post by: uelsk8s on December 23, 2007, 06:23:55 am
is this in 5.9 ?
Title: Re: trying to install wacom drivers- make fails
Post by: blurymind on December 23, 2007, 12:31:54 pm
is this in 5.9 ?
yes.

ok guys,heres an update on the problem. I figured out that the kernel is too edgy for the stable linuxwacom drivers, so that being the reason for previous error, i installed the development version (latest).
0.7.9-4

and no luck.Here is from Xorg.log

Quote
(WW) Option "XkbVariant" requires an string value
(**) Option "CustomKeycodes" "off"
(**) Keyboard0: CustomKeycodes disabled
(EE) No Input driver matching `wacom'
(EE) No Input driver matching `wacom'
(EE) No Input driver matching `wacom'
(EE) No Input driver matching `wacom'

also,for some reason wacdump /dev/input/wacom shows that everything is alright with the driver/device- it sees the wacom's model,shows stats for pressure level,xyz coordinates,etc,pressed buttons... i dont get it. Seems like Xorg does not want to accept it. I tried with modprobe wacom, still not loading it. Damn it. :-\
Title: Re: trying to install wacom drivers- make fails
Post by: blurymind on December 23, 2007, 01:38:09 pm
alright,update. I noticed that when running dmesg:

Quote
dmesg | grep wacom
usbcore: registered new interface driver wacom
drivers/input/tablet/wacom_sys.c: v1.46:USB Wacom Graphire and Wacom Intuos tablet driver
it gives me that, when everywhere else they say it should be giving me wacom.c
Title: Re: trying to install wacom drivers- make fails
Post by: uelsk8s on December 23, 2007, 01:53:33 pm
using the stable driver try this

Open /usr/include/xorg/miscstruct.h with an editor (as root).
Line 54 looks like this:

#include <pixman.h>

Edit it to look like this:

#include <pixman-1/pixman.h>

then try compiling it.
HTH,
Uelsk8s
Title: Re: trying to install wacom drivers- make fails
Post by: blurymind on December 23, 2007, 02:12:54 pm
using the stable driver try this

Open /usr/include/xorg/miscstruct.h with an editor (as root).
Line 54 looks like this:

#include <pixman.h>

Edit it to look like this:

#include <pixman-1/pixman.h>

then try compiling it.
HTH,
Uelsk8s

thanks,uel...i did that hours ago..but it seems that the stable driver doesnt support the kernel that 59 (...22) gold has. I need an older kernel to compile the stable driver,or i'll get the error from the second post after i install it. (or was it when installing an even older driver)

i'll try that again and report though... i must be missing something
Title: Re: trying to install wacom drivers- make fails
Post by: blurymind on December 23, 2007, 02:14:48 pm
i get this at make when compiling the stable driver:

Quote
./wcmCommon.c: In function 'xf86WcmEvent':
./wcmCommon.c:1099: error: 'pDev' undeclared (first use in this function)
./wcmCommon.c:1099: error: (Each undeclared identifier is reported only once
./wcmCommon.c:1099: error: for each function it appears in.)
make[3]: *** [wcmCommon.o] Error 1
make[3]: Leaving directory `/home/aqui/wacom/linuxwacom-0.7.8-3/src/xdrv'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/aqui/wacom/linuxwacom-0.7.8-3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/aqui/wacom/linuxwacom-0.7.8-3'
make: *** [all] Error 2
can somebody compile it with configure --enable-wacom ?
anybody getting the same error?

oh and when i try the prebuilt:
Quote
root:# ./install 
Installing Wacom man page......
Installed under /usr/share/man/man4

Installing wacom_drv....
wacom_drv.o installed under /usr/X11R6/lib/modules/input

Installing utility programs (wacdump, xidump, xsetwacom....)
Installed under /usr/local/bin

Installing wacomcpl......
Installed under /usr/local/bin


You need to compile and install wacom.(k)o manually if your kernel is out of date.

and still same error at xorg.log ((EE) No Input driver matching `wacom') i read at ubuntu forums that people having this problem fixed it by installing xserver-xorg-input-wacom,which i saw includes a couple of files,that are present at the source too
Title: Re: trying to install wacom drivers- make fails
Post by: blurymind on December 23, 2007, 02:42:57 pm
ok guys. I seem to resolved it...through brute force. I had to install two versions of the driver:

the stable and unstable one.
Here is what i did:

untared 0.7.8-3, failed at make, so i cd-ed to prebuilt/32 and ran
Quote
./uninstall
./install
(as root)
i knew i was missing  wacom.(k)o, and that i can get that file only with a successfull make>make install...

so,tired of a whole day of googling and pure pain in the arse (from sitting), i untared the unstable development tarball (0.7.9-4) and compile it successfully (mith Uel's hack,which i found at a slackware forum earlier,which was for another thing,i think), so with make install,i had all the files i need from the two packages.

i tried that earlier (the two steps on the development package and it didnt work,idk why)

Now it loads,but i must see if it will after a reboot.

The reason for this whole pain is not vector itself,but the version of kernel,which is really bleeding edge enough not to be supported by current stable wacom drivers. :(

I guess this is a pretty dirty hack and its not worth a howto. When they officially release a stable driver supporting vec59g's linux kernel,i will reinstall it the clean way and write a how to.
Untill then,the link in the second post is a good howto+this i hope,if somebody else stumbles on this trouble.

I did lots of things before this,so i cant retrack all my steps and im not entirely sure whats needed to get a wacom running.
Maybe tomorow i will try it again on the laptop,which also has vec59g
Title: Re: trying to install wacom drivers- make fails
Post by: blurymind on December 23, 2007, 02:54:16 pm
yes it works. I will try a cleaner way tomorow. :-\

1.get development version
2. instal prebuilt with scripts (uninstall-->install)
3.copy file wacom_drv.o
4.configure make install
5.Symlink wacom at /dev/input
6.add lines to xorg.conf
reboot and hope it will work

if you want to see if kernel version is supported by driver, go to its "src" folder,where there are kernel folders.
Title: Re: trying to install wacom drivers- make fails
Post by: blurymind on December 26, 2007, 01:50:42 pm
yes it works. I will try a cleaner way tomorow. :-\

1.get development version
2. instal prebuilt with scripts (uninstall-->install)
3.copy file wacom_drv.o
4.configure make install
5.Symlink wacom at /dev/input
6.add lines to xorg.conf
reboot and hope it will work

if you want to see if kernel version is supported by driver, go to its "src" folder,where there are kernel folders.

ok,this seems to work too on a clean install. I think i can make a package too. But its the development version of the driver that only works.
Title: Re: trying to install wacom drivers [Resolved]
Post by: uelsk8s on December 26, 2007, 02:01:31 pm
get a package put together and I'll give it a try.

Thanks
Uelsk8s
Title: Re: trying to install wacom drivers [Resolved]
Post by: blurymind on January 01, 2008, 12:20:25 pm
i however found that the development version has its downfalls:

1.its diagnostic applications dont work at all
2.Wine doesnt pick pressure sensitivity
3.its not compatable with expresskeys, expresskeys doesnt work at all- tablet multymedia keys are not working at all without expresskeys.

thus i dont think its worthy to package.I must get these to work,they are important.

another thing is that i need someone who has a wacom to test it too,after i package it. A wacom tablet must be plugged in. :(
Title: Re: trying to install wacom drivers [Resolved]
Post by: uelsk8s on January 01, 2008, 12:54:31 pm
I have a wacom tablet so i can try it out if you get it packaged.
Title: Re: trying to install wacom drivers [half Resolved]
Post by: blurymind on January 02, 2008, 09:29:44 am
i am sorry uel,but curently they're not worth packaging. I get a half-working build from the development version.

su
wacdump /dev/input/wacom
spills out zeros, which means that it didnt build quite right. Pressure sensitivity works,but expresskeys  doesnt seem to see the tablet,thus the buttons are not working and i cant assign them as keyboard shortcuts in gimp.

Wine doesnt seem to see the tablet at all,which is a big pitty,because there is some great graphics software that works flawlessly with wine and is perfect for tablets. :(

we have two options here:
1. try to get the development release of linuxwacom to full functionality and expresskeys to work
2.wait a couple of months untill the stable version of the driver supports the bleeding edge kernel that vec59 has and try again,

and then,after we have expresskeys working, tablet pressure working in wine, and wacdump showing tablet's diagnostics correctly..then its worth packaging. :-\

If you (or somebody else with a wacom) manage to get all that to work as it works on other major distros and package it,i will very gladly test out and report.
I myself think of waiting for the next stable driver to come out and try again.Sorry,but i lost a couple of days and hours in hedache tries. :-[  BUT I HAVENT GIVVEN UP YET  :P
Title: Re: trying to install wacom drivers [half Resolved]
Post by: blurymind on May 25, 2008, 01:53:09 am
status update- today i saw that a new linux wacom driver has been released.I will now have to install vector linux on my main machine and try to compile the new driver.
My chances are either they fixed it in the driver,or they fixed it in xorg or the kernel...

SO,to get higher chances,i would have to use a version of VL that has a newer/different version of xorg and kernel than the ones found in 59gold.

IF any developer provides me with information about some VL testing release untill the end of the day,i will gladly try to compile the new driver there. Now i read that soho version of 59 has xorg7.3 (newer than std59?) - to get that version i would need money,something i dont have right now.

MY other way is to go with std59gold again and if i encounter the same problems (patching in order to compile,after compile,no pressure sensitivity picked,no expresskeys working),i will  try to upgrade xorg and recompile wacomdriver  :-\

if it all gets right and everything works fine as it does under ubuntu and mandriva,i promise to make a package of the driver and add a howto set wacom tablets to vec's wiki or howto forum.

i really need my wacom under linux, guys

EDIT: alright i saw that vector light has x11-7.3
http://numsum.com/spreadsheet/show/58651
would it be alright if i build the wacom driver on it? OR a build on 59gold would be better for the comunity?
help me out here guys, i have no idea what package versions there are in the stable releases.
Title: Re: trying to install wacom drivers [half Resolved]
Post by: M0E-lnx on May 25, 2008, 07:05:36 am
vl light is good for building

ltns btw. welcome back
Title: Re: trying to install wacom drivers [half Resolved]
Post by: blurymind on May 25, 2008, 07:19:39 am
thanks. I will download it right now.

Tomorow or later today i will try to get wacom working right.Wish me luck. =P
Title: Re: trying to install wacom drivers [half Resolved]
Post by: blurymind on May 25, 2008, 03:17:06 pm
same results... tried with vl-light59rc1   :'( :'(

wacdump spills zeros
express keys not working
no tablet pressure in wine
 :'(

am i doing something wrong? How the hell does one install linux wacom then
Title: Re: trying to install wacom drivers [half Resolved]
Post by: blurymind on May 25, 2008, 03:46:31 pm
how do i copy those files,when there is no such dir?

http://linuxwacom.sourceforge.net/index.php/minihowto
somebody more advanced heelp,i am not giving up yet
Title: Re: trying to install wacom drivers [half Resolved]
Post by: M0E-lnx on May 25, 2008, 03:50:59 pm
have you ever been able to install them successfully on any other distro?
Title: Re: trying to install wacom drivers [half Resolved]
Post by: blurymind on May 26, 2008, 02:56:22 am
have you ever been able to install them successfully on any other distro?
yeah,they worked flawlessly out of the box!

Tried on
*buntu
mandriva
pclinuxos
suse
fedora

(they all have the drivers precompiled and everything set (like xorg.conf and a symlink in dev/input) in order for them to work just after you install them with apt-get or urpmi or yum
and so on

no slackware12 based ones though.I was thinking of zenwalk,but i really dont like zen much..

the thing with vector is that the drivers installs without errors anymore, but it doesnt work right. Pressure sensitivity works in gimp,but not in wine+apps where its emulated (like artrage). This is a show-stopper for me,because i need artrage,photoshop and open canvas +wine to have pressure sensitivity,like they do on most other distros.

my guess is that

a)wacom driver doesnt like the version of xorg
b)wine needs to be precompiled with some special configure option that i dont know of (slim chance)
c)a kernel module doesnt get copied during make install and i need to copy it manually.Im not very familiar with the cp command,i also can't start pcmanfm as root,which makes it a pain for me xD

its really a big pain to get it work right.Uel,if you have tablet to test it, i will really apreciate it if you try to get it to work in wine+artrage and make wacdump show some healthy stats and not zeros.I am missing something in the install procedure or slackware just hates wacom drivers and thus the lack of any precompiled package out there
Title: Re: trying to install wacom drivers [half Resolved]
Post by: uelsk8s on May 26, 2008, 05:05:34 am
I think your guess
Quote
c)a kernel module doesnt get copied during make install and i need to copy it manually.Im not very familiar with the cp command,i also can't start pcmanfm as root,which makes it a pain for me xD
is correct.

try this from the wacom dir
Code: [Select]
cp src/2.6.22/wacom.ko /lib/modules/2.6.22.19/kernel/drivers/input/then run
Code: [Select]
depmod -aqand see if the module loads
Code: [Select]
modprobe wacom
Title: Re: trying to install wacom drivers [half Resolved]
Post by: M0E-lnx on May 26, 2008, 06:26:07 am
I was going to suggest comparing which modules get loaded on the other distros to what gets loaded on vl
Title: Re: trying to install wacom drivers [half Resolved]
Post by: blurymind on May 26, 2008, 08:56:14 am
there already is a wacom.ko file in

/lib/modules/2.6.22.19/kernel/drivers/input/tablet/
 ::)

i did what you said anyway and again-same results..
 :-[


also today i recompiled wine 1rc2 and again-no pressure picked.
Title: Re: trying to install wacom drivers [half Resolved]
Post by: uelsk8s on May 26, 2008, 09:11:39 am
it looks like the wacom.ko in /lib/modules/2.6.22.19/kernel/drivers/input/tablet/ comes with the kernel.
Quote
vector://home/uel/linuxwacom-0.8.0-3/src/2.6.22
root:# diff /lib/modules/2.6.22.19/kernel/drivers/input/tablet/wacom.ko  /lib/modules/2.6.22.19/kernel/drivers/input/wacom.ko
Binary files /lib/modules/2.6.22.19/kernel/drivers/input/tablet/wacom.ko and /lib/modules/2.6.22.19/kernel/drivers/input/wacom.ko differ

try removing the one in /lib/modules/2.6.22.19/kernel/drivers/input/tablet/ and then run the commands from above again.

The wacom tablet i have has only a mouse, not a pen, so i dont think it would help here.
Title: Re: trying to install wacom drivers [half Resolved]
Post by: blurymind on May 26, 2008, 09:48:47 am
I replaced the one in there with the one from the source folder by issuing the cp command again,this time with the path to it.

After that i issued the commands,then i even reinstalled nvidia driver.

Wacom pressure sensitivity still not working in wine and wacdump spills zeros.

I dont know what to try next  :-[
Title: Re: trying to install wacom drivers [half Resolved]
Post by: uelsk8s on May 26, 2008, 10:19:08 am
the best i can tell, it is working here
(http://imagebin.ca.tbcdn.com/img/4JnI2-S.png)
Title: Re: trying to install wacom drivers [half Resolved]
Post by: blurymind on May 26, 2008, 11:16:19 am
I can see wacdump works for you,its showing the cursor position values correctly...

can you package it somehow or retrace how you installed it please?

there is a possibility that the problem is only for graphire 4 tablets

If you make a package i will gladly test it

Thank you
Title: Re: trying to install wacom drivers [half Resolved]
Post by: uelsk8s on May 26, 2008, 11:43:06 am
Well here it is: http://vectorlinux.osuosl.org/Uelsk8s/linuxwacom-0.8.0-3-i586-1vl59.tlz

If it works Ill finish up the buildscript and upload it to the repo
Title: Re: trying to install wacom drivers [half Resolved]
Post by: blurymind on May 27, 2008, 02:07:11 pm
Well here it is: http://vectorlinux.osuosl.org/Uelsk8s/linuxwacom-0.8.0-3-i586-1vl59.tlz

If it works Ill finish up the buildscript and upload it to the repo

thanks.I'll test it right away.

Its too bad you dont have a stylus. :-[
Title: Re: trying to install wacom drivers [half Resolved]
Post by: blurymind on May 27, 2008, 02:16:08 pm
damn,whats wrong with this driver.How did ubuntu and mandriva team managed to get it right?  :-[

the values on wacdump are frozen
pressure sensitivity still does not work in wine. Thanks for trying...it still works in gimp though,but gimp's not enought for me.I need artrage again. =(

On a relate note,this problem occured with ubuntu too for a while:

https://bugs.launchpad.net/ubuntu/+source/wine/+bug/151448

but they fixed it on gutsy gibbon somehow (works,tested it)

what did they do to their driver?

it seems that again,hardy heron has the same problem with the dead stats in wacdump and the lack of pressure in wine:

http://ubuntuforums.org/showthread.php?t=745102
i'm going to try this patch before i go to sleep

my next best guess is that theres nothing wrong with the driver, only wine guys need to some time to get things updated to the bleeding edge.
I would say uel,its fine for the repo...if you could also add this symlink file :

/etc/udev/rules.d/10-wacom.rules
Code: [Select]
KERNEL=="event*", ATTRS{idVendor}=="056a", NAME="input/%k", SYMLINK+="input/wacom" and somehow add the default lines in xorg.conf (or maybe just the first) , it would make a pretty sweet addition!
Title: Re: trying to install wacom drivers [half Resolved]
Post by: exeterdad on May 27, 2008, 02:38:00 pm
By the info in the links you just gave, it would appear the driver is fine.  You said it's working with Gimp.  Looks like another case of something not working quite right with wine running a windows app?  I guess you can try to patch your wine as mentioned in the links?
Title: Re: trying to install wacom drivers [half Resolved]
Post by: blurymind on May 27, 2008, 02:41:46 pm
By the info in the links you just gave, it would appear the driver is fine.  You said it's working with Gimp.  Looks like another case of something not working quite right with wine running a windows app?  I guess you can try to patch your wine as mentioned in the links?
yeah,this is new info for me.Makes me think that wine devs just need to catch up a bit...
but yet wacdump application's behaviour doesnt speak for a healthy driver,and in my case xidump -l states "extended" instead of "unknown"
and xsetpointer -l is a command not found.

i am recompiling wine with the patch applied as we speak.Will let you know asap. :P
Title: Re: trying to install wacom drivers [half Resolved]
Post by: exeterdad on May 27, 2008, 02:45:28 pm
Wish I could help you my friend.  But I've never been able to get my hands on a Wacom tablet.  I do want one.  But what you and Uel have been posting about may as well be Martian since I don't know a thing about them.
Title: Re: trying to install wacom drivers [half Resolved]
Post by: blurymind on May 27, 2008, 03:13:39 pm
YES! SUCESS!

After months this problem was located and fixed.After applying the patch:

patch.file:
http://azure.freehost.pl/patch.file
backup code of the patch (in case the link goes down)
Code: [Select]
*** dlls/winex11.drv/xdnd.c 2008-04-18 17:47:52.000000000 +0200
--- xdnd.c1 2008-04-24 16:11:23.000000000 +0200
***************
*** 21,26 ****
--- 21,28 ----
 
  #include "config.h"
  #include "wine/port.h"
+ #define COBJMACROS
+ #include <initguid.h>
 
  #include <string.h>
  #ifdef HAVE_UNISTD_H
***************
*** 36,41 ****
--- 38,45 ----
 
  #include "x11drv.h"
  #include "shlobj.h"  /* DROPFILES */
+ #include "oleidl.h"
+ #include "objidl.h"
 
  #include "wine/unicode.h"
  #include "wine/debug.h"
***************
*** 57,62 ****
--- 61,70 ----
 
  static LPXDNDDATA XDNDData = NULL;
  static POINT XDNDxy = { 0, 0 };
+ extern IDataObject xdndDataObject;
+ static BOOL XDNDEntered = FALSE;
+ static BOOL XDNDAccepted = FALSE;
+ static DWORD XDNDDropEffect = DROPEFFECT_NONE;
 
  static void X11DRV_XDND_InsertXDNDData(int property, int format, void* data, unsigned int len);
  static int X11DRV_XDND_DeconstructTextURIList(int property, void* data, int len);
***************
*** 69,74 ****
--- 77,86 ----
  static void X11DRV_XDND_FreeDragDropOp(void);
  static unsigned int X11DRV_XDND_UnixToDos(char** lpdest, char* lpsrc, int len);
  static WCHAR* X11DRV_XDND_URIToDOS(char *encodedURI);
+ static DROPFILES* X11DRV_XDND_BuildDropFiles(char* filename, unsigned int len, POINT pt);
+ static void X11DRV_XDND_DescribeClipboardFormat(int cfFormat, char *buffer, int size);
+ static DWORD X11DRV_XDND_ActionToDROPEFFECT(long action);
+ static long X11DRV_XDND_DROPEFFECTToAction(DWORD effect);
 
  static CRITICAL_SECTION xdnd_cs;
  static CRITICAL_SECTION_DEBUG critsect_debug =
***************
*** 150,163 ****
  {
      XClientMessageEvent e;
      int accept = 0; /* Assume we're not accepting */
!
      XDNDxy.x = event->data.l[2] >> 16;
      XDNDxy.y = event->data.l[2] & 0xFFFF;
 
!     /* FIXME: Notify OLE of DragEnter. Result determines if we accept */
 
      if (GetWindowLongW( hWnd, GWL_EXSTYLE ) & WS_EX_ACCEPTFILES)
          accept = 1;
 
      TRACE("action req: %ld accept(%d) at x(%d),y(%d)\n",
            event->data.l[4], accept, XDNDxy.x, XDNDxy.y);
--- 162,234 ----
  {
      XClientMessageEvent e;
      int accept = 0; /* Assume we're not accepting */
!     HMODULE ole32;
!     IDropTarget *dropTarget = NULL;
!     DWORD effect;
!     POINTL pointl;

      XDNDxy.x = event->data.l[2] >> 16;
      XDNDxy.y = event->data.l[2] & 0xFFFF;
 
!         pointl.x = XDNDxy.x;
!         pointl.y = XDNDxy.y;
!     
!         effect = X11DRV_XDND_ActionToDROPEFFECT(event->data.l[4]);
!     
!         /* Notify OLE of DragEnter. Result determines if we accept */
!         ole32 = GetModuleHandleA("OLE32.DLL");
!         if (ole32)
!         {
!             IDropTarget *(CDECL *wine_oledd_find_drop_target)(HWND) = (void*)
!                 GetProcAddress(ole32, "wine_oledd_find_drop_target");
!             if (wine_oledd_find_drop_target)
!             {
!             dropTarget = wine_oledd_find_drop_target(hWnd);
!                 if (dropTarget)
!                 {
!                     HRESULT hr;
!                     if (XDNDEntered == FALSE)
!                     {
!                         XDNDEntered = TRUE;
!                         hr = IDropTarget_DragEnter(dropTarget, &xdndDataObject,
!                                                    MK_LBUTTON, pointl, &effect);
!                         if (SUCCEEDED(hr))
!                         {
!                             if (effect != DROPEFFECT_NONE)
!                             {
!                                 XDNDAccepted = TRUE;
!                                 TRACE("the application accepted the drop\n");
!                             }
!                             else
!                                 TRACE("the application refused the drop\n");
!                         }
!                         else
!                             WARN("IDropTarget_DragEnter failed, error 0x%X\n", hr);
!                     }
!                 }
!                 else
!                     TRACE("no drop target\n");
!             }
!             else
!                 WARN("wine_oledd_find_drop_target not found\n");
!         }
!         else
!             WARN("loading ole32 failed\n");
!         if (XDNDAccepted)
!             accept = 1;
 
      if (GetWindowLongW( hWnd, GWL_EXSTYLE ) & WS_EX_ACCEPTFILES)
          accept = 1;
+     /* If drag accepted notify OLE of DragOver */
+     if (dropTarget && accept)
+     {
+         HRESULT hr = IDropTarget_DragOver(dropTarget, MK_LBUTTON, pointl, &effect);
+         if (SUCCEEDED(hr))
+             XDNDDropEffect = effect;
+         else
+             WARN("IDropTarget_DragOver failed, error 0x%X\n", hr);
+     }
+
 
      TRACE("action req: %ld accept(%d) at x(%d),y(%d)\n",
            event->data.l[4], accept, XDNDxy.x, XDNDxy.y);
***************
*** 176,188 ****
      e.data.l[2] = 0; /* Empty Rect */
      e.data.l[3] = 0; /* Empty Rect */
      if (accept)
!         e.data.l[4] = event->data.l[4];
!     else
          e.data.l[4] = None;
      wine_tsx11_lock();
      XSendEvent(event->display, event->data.l[0], False, NoEventMask, (XEvent*)&e);
      wine_tsx11_unlock();
 
      /* FIXME: if drag accepted notify OLE of DragOver */
  }
 
--- 247,260 ----
      e.data.l[2] = 0; /* Empty Rect */
      e.data.l[3] = 0; /* Empty Rect */
      if (accept)
!         e.data.l[4] = X11DRV_XDND_DROPEFFECTToAction(effect);
! else
          e.data.l[4] = None;
      wine_tsx11_lock();
      XSendEvent(event->display, event->data.l[0], False, NoEventMask, (XEvent*)&e);
      wine_tsx11_unlock();
 
+     XDNDEntered = XDNDAccepted = FALSE;
      /* FIXME: if drag accepted notify OLE of DragOver */
  }
 
***************
*** 194,207 ****
  void X11DRV_XDND_DropEvent( HWND hWnd, XClientMessageEvent *event )
  {
      XClientMessageEvent e;
!
      TRACE("\n");
 
      /* If we have a HDROP type we send a WM_ACCEPTFILES.*/
      if (GetWindowLongW( hWnd, GWL_EXSTYLE ) & WS_EX_ACCEPTFILES)
          X11DRV_XDND_SendDropFiles( hWnd );
 
!     /* FIXME: Notify OLE of Drop */
      X11DRV_XDND_FreeDragDropOp();
 
      /* Tell the target we are finished. */
--- 266,317 ----
  void X11DRV_XDND_DropEvent( HWND hWnd, XClientMessageEvent *event )
  {
      XClientMessageEvent e;
!     HMODULE ole32;
!     
      TRACE("\n");
 
      /* If we have a HDROP type we send a WM_ACCEPTFILES.*/
      if (GetWindowLongW( hWnd, GWL_EXSTYLE ) & WS_EX_ACCEPTFILES)
          X11DRV_XDND_SendDropFiles( hWnd );
 
!
!     /* Notify OLE of Drop */
!     ole32 = GetModuleHandleA("OLE32.DLL");
!     if (ole32)
!     {
!         IDropTarget *(CDECL *wine_oledd_find_drop_target)(HWND) = (void*)
!             GetProcAddress(ole32, "wine_oledd_find_drop_target");
!         if (wine_oledd_find_drop_target)
!         {
!             IDropTarget *dropTarget = wine_oledd_find_drop_target(hWnd);
!             if (dropTarget)
!             {
!                 HRESULT hr;
!                 POINTL pointl;
!                 DWORD effect = XDNDDropEffect;
!
!                 pointl.x = XDNDxy.x;
!                 pointl.y = XDNDxy.y;
!                 hr = IDropTarget_Drop(dropTarget, &xdndDataObject, MK_LBUTTON,
!                                       pointl, &effect);
!                 if (SUCCEEDED(hr))
!                 {
!                     if (effect != DROPEFFECT_NONE)
!                         TRACE("drop succeeded\n");
!                     else
!                         TRACE("the application refused the drop\n");
!                 }
!                 else
!                     WARN("drop failed, error 0x%X\n", hr);
!             }
!             else
!                 TRACE("no drop target\n");
!         }
!         else
!             WARN("wine_oledd_find_drop_target failed\n");
!     }
!     else
!         WARN("failed loading ole32\n");
      X11DRV_XDND_FreeDragDropOp();
 
      /* Tell the target we are finished. */
***************
*** 224,234 ****
   */
  void X11DRV_XDND_LeaveEvent( HWND hWnd, XClientMessageEvent *event )
  {
      TRACE("DND Operation canceled\n");
 
      X11DRV_XDND_FreeDragDropOp();
 
!     /* FIXME: Notify OLE of DragLeave */
  }
 
 
--- 334,370 ----
   */
  void X11DRV_XDND_LeaveEvent( HWND hWnd, XClientMessageEvent *event )
  {
+     HMODULE ole32;
      TRACE("DND Operation canceled\n");
 
      X11DRV_XDND_FreeDragDropOp();
 
!         /* Notify OLE of DragLeave */
!         ole32 = GetModuleHandleA("OLE32.DLL");
!         if (ole32)
!         {
!             IDropTarget *(CDECL *wine_oledd_find_drop_target)(HWND) = (void*)
!                 GetProcAddress(ole32, "wine_oledd_find_drop_target");
!             if (wine_oledd_find_drop_target)
!             {
!                 IDropTarget *dropTarget = wine_oledd_find_drop_target(hWnd);
!                 if (dropTarget)
!                 {
!                     HRESULT hr = IDropTarget_DragLeave(dropTarget);
!                     if (FAILED(hr))
!                         WARN("IDropTarget_DragLeave failed, error 0x%X\n", hr);
!                 }
!                 else
!                     TRACE("drop target not found\n");
!             }
!             else
!                 WARN("wine_oledd_find_drop_target not found\n");       
!         }
!         else
!             WARN("loading ole32 failed\n");
!     
!         XDNDEntered = XDNDAccepted = FALSE;
!     
  }
 
 
***************
*** 248,254 ****
      unsigned long bytesret, icount;
      int entries = 0;
      unsigned char* data = NULL;
!
      TRACE("count(%ld)\n", *count);
 
      X11DRV_XDND_FreeDragDropOp(); /* Clear previously cached data */
--- 384,392 ----
      unsigned long bytesret, icount;
      int entries = 0;
      unsigned char* data = NULL;
!     XDNDDATA *previous = NULL;
!     XDNDDATA *current, *next;
!     BOOL haveHDROP = FALSE;
      TRACE("count(%ld)\n", *count);
 
      X11DRV_XDND_FreeDragDropOp(); /* Clear previously cached data */
***************
*** 291,297 ****
--- 429,493 ----
          XFree(data);
          wine_tsx11_unlock();
      }
+     /* We get the list of formats in descending order of preference, yet the linked
+      * list is a stack so the order is inverted. Reverse the linked list here so
+      * that we get the right order.
+      */
+     current = XDNDData;
+     while (current != NULL)
+     {
+         next = current->next;
+         current->next = previous;
+     previous = current;
+         current = next;
+     }
+     if (previous)
+         XDNDData = previous;
 
+     /* On Windows when there is a CF_HDROP, there is no other CF_ formats.
+      * foobar2000 relies on this (spaces -> %20's without it).
+      */
+     current = XDNDData;
+     while (current != NULL)
+     {
+         if (current->cf_win == CF_HDROP)
+         {
+             haveHDROP = TRUE;
+             break;
+         }
+         current = current->next;
+     }
+     if (haveHDROP)
+     {
+         current = XDNDData;
+         while (current != NULL
+             && current->cf_win != CF_HDROP
+             && current->cf_win < CF_MAX)
+         {
+             next = current->next;
+             HeapFree(GetProcessHeap(), 0, current->data);
+             HeapFree(GetProcessHeap(), 0, current);
+         current = next;
+             --entries;
+         }
+     XDNDData = previous = current;
+         while (current != NULL)
+         {
+             current = current->next;
+             while (current != NULL
+                 && current->cf_win != CF_HDROP
+                 && current->cf_win < CF_MAX)
+             {
+                 next = current->next;
+                 HeapFree(GetProcessHeap(), 0, current->data);
+                 HeapFree(GetProcessHeap(), 0, current);
+                 current = next;
+                 --entries;
+             }
+             previous->next = current;
+             previous = current;
+         }
+     }
      *count = entries;
  }
 
***************
*** 655,657 ****
--- 851,1164 ----
      HeapFree(GetProcessHeap(), 0, uri);
      return ret;
  }
+ /**************************************************************************
+  * X11DRV_XDND_DescribeClipboardFormat
+  */
+ static void X11DRV_XDND_DescribeClipboardFormat(int cfFormat, char *buffer, int size)
+ {
+ #define D(x) case x: lstrcpynA(buffer, #x, size); return;
+     switch (cfFormat)
+     {
+         D(CF_TEXT)
+         D(CF_BITMAP)
+         D(CF_METAFILEPICT)
+         D(CF_SYLK)
+         D(CF_DIF)
+         D(CF_TIFF)
+         D(CF_OEMTEXT)
+         D(CF_DIB)
+         D(CF_PALETTE)
+         D(CF_PENDATA)
+     D(CF_RIFF)
+         D(CF_WAVE)
+         D(CF_UNICODETEXT)
+         D(CF_ENHMETAFILE)
+         D(CF_HDROP)
+         D(CF_LOCALE)
+         D(CF_DIBV5)
+     }
+ #undef D
+
+     if (CF_PRIVATEFIRST <= cfFormat && cfFormat <= CF_PRIVATELAST)
+     {
+         GetClipboardFormatNameA(cfFormat, buffer, size);
+         return;
+     }
+
+     if (CF_GDIOBJFIRST <= cfFormat && cfFormat <= CF_GDIOBJLAST)
+     {
+         lstrcpynA(buffer, "some GDI object", size);
+         return;
+     }
+
+     snprintf(buffer, size, "unknown format %d", cfFormat);
+ }
+
+
+ /**************************************************************************
+  * X11DRV_XDND_ActionToDROPEFFECT
+  */
+ static DWORD X11DRV_XDND_ActionToDROPEFFECT(long action)
+ {
+     /* In Windows, nothing but the given effects is allowed.
+      * In X the given action is just a hint, and you can always
+      * XdndActionCopy and XdndActionPrivate, so be more permissive. */
+     if (action == x11drv_atom(XdndActionCopy))
+     return DROPEFFECT_COPY;
+     else if (action == x11drv_atom(XdndActionMove))
+         return DROPEFFECT_MOVE | DROPEFFECT_COPY;
+     else if (action == x11drv_atom(XdndActionLink))
+         return DROPEFFECT_LINK | DROPEFFECT_COPY;
+     else if (action == x11drv_atom(XdndActionAsk))
+         /* FIXME: should we somehow ask the user what to do here? */
+         return DROPEFFECT_COPY | DROPEFFECT_MOVE | DROPEFFECT_LINK;
+     FIXME("unknown action %ld, assuming DROPEFFECT_COPY\n", action);
+     return DROPEFFECT_COPY;
+ }
+
+
+ /**************************************************************************
+  * X11DRV_XDND_DROPEFFECTToAction
+  */
+ static long X11DRV_XDND_DROPEFFECTToAction(DWORD effect)
+ {
+     if (effect == DROPEFFECT_COPY)
+         return x11drv_atom(XdndActionCopy);
+     else if (effect == DROPEFFECT_MOVE)
+         return x11drv_atom(XdndActionMove);
+     else if (effect == DROPEFFECT_LINK)
+         return x11drv_atom(XdndActionLink);
+     FIXME("unknown drop effect %u, assuming XdndActionCopy\n", effect);
+     return x11drv_atom(XdndActionCopy);
+ }
+
+
+ /* The IDataObject singleton we feed to OLE follows */
+
+ static HRESULT WINAPI DATAOBJECT_QueryInterface(IDataObject *dataObject,
+                                                 REFIID riid, void **ppvObject)
+ {
+     TRACE("(%p, %s, %p)\n", dataObject, debugstr_guid(riid), ppvObject);
+     if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDataObject))
+     {
+         *ppvObject = dataObject;
+         IDataObject_AddRef(dataObject);
+         return S_OK;
+     }
+     *ppvObject = NULL;
+     return E_NOINTERFACE;
+ }
+
+ static ULONG WINAPI DATAOBJECT_AddRef(IDataObject *dataObject)
+ {
+     TRACE("(%p)\n", dataObject);
+     return 2;
+ }
+
+ static ULONG WINAPI DATAOBJECT_Release(IDataObject *dataObject)
+ {
+     TRACE("(%p)\n", dataObject);
+     return 1;
+ }
+
+ static HRESULT WINAPI DATAOBJECT_GetData(IDataObject *dataObject,
+                                          FORMATETC *formatEtc,
+                                          STGMEDIUM *pMedium)
+ {
+     XDNDDATA *data = XDNDData;
+     HRESULT hr;
+     char buffer[1024];
+
+     TRACE("(%p, %p, %p)\n", dataObject, formatEtc, pMedium);
+     X11DRV_XDND_DescribeClipboardFormat(formatEtc->cfFormat,
+                                         buffer, sizeof(buffer));
+     TRACE("application is looking for %s\n", buffer);
+
+     hr = IDataObject_QueryGetData(dataObject, formatEtc);
+     if (SUCCEEDED(hr))
+     {
+         while (data != NULL)
+         {
+             if (data->cf_win == formatEtc->cfFormat)
+             {
+                 pMedium->tymed = TYMED_HGLOBAL;
+                 pMedium->hGlobal = HeapAlloc(GetProcessHeap(), 0, data->size);
+                 if (pMedium->hGlobal == NULL)
+                     return E_OUTOFMEMORY;
+                 memcpy(pMedium->hGlobal, data->data, data->size);
+                 pMedium->pUnkForRelease = 0;
+                 return S_OK;
+             }
+             data = data->next;
+         }
+     }
+     return hr;
+ }
+
+ static HRESULT WINAPI DATAOBJECT_GetDataHere(IDataObject *dataObject,
+                                              FORMATETC *formatEtc,
+                                              STGMEDIUM *pMedium)
+ {
+     FIXME("(%p, %p, %p): stub\n", dataObject, formatEtc, pMedium);
+     return DATA_E_FORMATETC;
+ }
+
+ static HRESULT WINAPI DATAOBJECT_QueryGetData(IDataObject *dataObject,
+                                               FORMATETC *formatEtc)
+ {
+     XDNDDATA *data = XDNDData;
+     char buffer[1024];
+
+     TRACE("(%p, %p)\n", dataObject, formatEtc);
+     X11DRV_XDND_DescribeClipboardFormat(formatEtc->cfFormat, buffer,
+                                         sizeof(buffer));
+
+     if (formatEtc->tymed != TYMED_HGLOBAL)
+ {
+         FIXME("only HGLOBAL medium types supported right now\n");
+         return E_NOTIMPL;
+     }
+     if (formatEtc->dwAspect != DVASPECT_CONTENT)
+     {
+         FIXME("only the content aspect is supported right now\n");
+         return E_NOTIMPL;
+     }
+
+     while (data != NULL)
+     {
+         if (data->cf_win == formatEtc->cfFormat)
+         {
+             TRACE("application found %s\n", buffer);
+             return S_OK;
+         }
+         data = data->next;
+     }
+     TRACE("application didn't find %s\n", buffer);
+     return DV_E_FORMATETC;
+ }
+
+ static HRESULT WINAPI DATAOBJECT_GetCanonicalFormatEtc(IDataObject *dataObject,
+                                                        FORMATETC *formatEtc,
+                                                        FORMATETC *formatEtcOut)
+ {
+     FIXME("(%p, %p, %p): stub\n", dataObject, formatEtc, formatEtcOut);
+     formatEtcOut->ptd = NULL;
+     return E_NOTIMPL;
+ }
+
+ static HRESULT WINAPI DATAOBJECT_SetData(IDataObject *dataObject,
+                                          FORMATETC *formatEtc,
+                                          STGMEDIUM *pMedium, BOOL fRelease)
+ {
+     FIXME("(%p, %p, %p, %s): stub\n", dataObject, formatEtc,
+         pMedium, fRelease?"TRUE":"FALSE");
+     return E_NOTIMPL;
+ }
+
+ static HRESULT WINAPI DATAOBJECT_EnumFormatEtc(IDataObject *dataObject,
+                                                DWORD dwDirection,
+                                                IEnumFORMATETC *ppEnumFormatEtc)
+ {
+     HMODULE shell32;
+     XDNDDATA *data = XDNDData;
+     int i;
+     DWORD count = 0;
+     FORMATETC *formats;
+     HRESULT hr;
+
+     TRACE("(%u, %p)\n", dwDirection, ppEnumFormatEtc);
+
+     if (dwDirection != DATADIR_GET)
+     {
+         FIXME("only the get direction is implemented\n");
+         return E_NOTIMPL;
+     }
+
+     while (data != NULL)
+     {
+         data = data->next;
+         ++count;
+     }
+
+     formats = HeapAlloc(GetProcessHeap(), 0, count * sizeof(FORMATETC));
+     if (formats)
+     {
+         data = XDNDData;
+         for (i = 0; i < count; ++i)
+         {
+             formats[i].cfFormat = data->cf_win;
+             formats[i].ptd = NULL;
+             formats[i].dwAspect = DVASPECT_CONTENT;
+             formats[i].lindex = -1;
+             formats[i].tymed = TYMED_HGLOBAL;
+             data = data->next;
+         }
+         /* For some strange reason, load-time linking SHELL32.DLL to WINEX11.DRV
+          * causes wine to segfault on startup. So rather use run-time linking.
+          */
+         shell32 = LoadLibraryA("SHELL32.DLL");
+         if (shell32)
+         {
+             HRESULT (WINAPI *SHCreateStdEnumFmtEtc)(DWORD, FORMATETC*, IEnumFORMATETC**) = (void*)
+                 GetProcAddress(shell32, (char*) MAKELONG(74, 0));
+             if (SHCreateStdEnumFmtEtc)
+                 hr = SHCreateStdEnumFmtEtc(count, formats, ppEnumFormatEtc);
+             else
+             {
+                 ERR("symbol lookup of SHCreateStdEnumFmtEtc failed\n");
+                 hr = E_FAIL;
+             }
+         }
+         else
+         {
+             WARN("loading SHELL32.DLL failed\n");
+             hr = E_FAIL;
+         }
+         HeapFree(GetProcessHeap(), 0, formats);
+         return hr;
+     }
+     else
+         return E_OUTOFMEMORY;
+ }
+
+ static HRESULT WINAPI DATAOBJECT_DAdvise(IDataObject *dataObject,
+                                          FORMATETC *formatEtc, DWORD advf,
+                                          IAdviseSink *adviseSink,
+                                          DWORD *pdwConnection)
+ {
+     FIXME("(%p, %p, %u, %p, %p): stub\n", dataObject, formatEtc, advf,
+         adviseSink, pdwConnection);
+     return OLE_E_ADVISENOTSUPPORTED;
+ }
+
+ static HRESULT WINAPI DATAOBJECT_DUnadvise(IDataObject *dataObject,
+                                            DWORD dwConnection)
+ {
+     FIXME("(%p, %u): stub\n", dataObject, dwConnection);
+     return OLE_E_ADVISENOTSUPPORTED;
+ }
+
+ static HRESULT WINAPI DATAOBJECT_EnumDAdvise(IDataObject *dataObject,
+                                              IEnumSTATDATA **pEnumAdvise)
+ {
+     FIXME("(%p, %p): stub\n", dataObject, pEnumAdvise);
+     return OLE_E_ADVISENOTSUPPORTED;
+ }
+
+ static IDataObjectVtbl xdndDataObjectVtbl =
+ {
+     DATAOBJECT_QueryInterface,
+     DATAOBJECT_AddRef,
+     DATAOBJECT_Release,
+     DATAOBJECT_GetData,
+     DATAOBJECT_GetDataHere,
+     DATAOBJECT_QueryGetData,
+     DATAOBJECT_GetCanonicalFormatEtc,
+     DATAOBJECT_SetData,
+     DATAOBJECT_EnumFormatEtc,
+     DATAOBJECT_DAdvise,
+     DATAOBJECT_DUnadvise,
+     DATAOBJECT_EnumDAdvise
+ };
+
+ IDataObject xdndDataObject = { &xdndDataObjectVtbl };

*** dlls/ole32/ole2.c 2008-04-18 17:47:52.000000000 +0200
--- ole2.c 2008-04-24 09:24:26.000000000 +0200
***************
*** 1940,1945 ****
--- 1940,1953 ----
    return NULL;
  }
 
+ IDropTarget* wine_oledd_find_drop_target(HWND hwndOfTarget)
+ {
+     DropTargetNode *node = OLEDD_FindDropTarget(hwndOfTarget);
+     if (node)
+         return node->dropTarget;
+     return NULL;
+ }
+
  /***
   * OLEDD_DragTrackerWindowProc()
   *
*** dlls/ole32/ole32.spec 2008-04-18 17:47:52.000000000 +0200
--- ole32.spec 2008-04-24 00:21:38.000000000 +0200
***************
*** 277,279 ****
--- 277,281 ----
  @ stdcall WriteFmtUserTypeStg(ptr long ptr)
  @ stub WriteOleStg
  @ stub WriteStringStream
+ @ cdecl wine_oledd_find_drop_target(long)
+
*** dlls/winex11.drv/wintab.c 2008-04-18 17:47:52.000000000 +0200
--- winetab.c1 2008-04-21 19:51:48.000000000 +0200
417,430c417,420
<     int i;
<     static const char* tablet_stylus_whitelist[] = {
<         "stylus",
<         "wizardpen",
<         NULL
<     };
<
<     for (i=0; tablet_stylus_whitelist[i] != NULL; i++) {
<         if (name && match_token(name, tablet_stylus_whitelist[i]))
<             return TRUE;
<         if (type && match_token(type, tablet_stylus_whitelist[i]))
<             return TRUE;
<     }
<
---
>     if (name && match_token(name, "stylus"))
>         return TRUE;
>     if (type && match_token(type, "stylus"))
>         return TRUE;
526d515
<         LPWTI_CURSORS_INFO cursor;
528c517
<         TRACE("Device %i:  [id %d|name %s|type %s|num_classes %d|use %d]\n",
---
>         TRACE("Device %i:  [id %d|name %s|type %s|num_classes %d|use %s]\n",
530c519,524
<                 devices[loop].num_classes, devices[loop].use );
---
>                 devices[loop].num_classes,
>                 devices[loop].use == IsXKeyboard ? "IsXKeyboard" :
>                     devices[loop].use == IsXPointer ? "IsXPointer" :
>                     devices[loop].use == IsXExtensionDevice ? "IsXExtensionDevice" :
>                     "Unknown"
>                 );
532,538c526,529
<         switch (devices[loop].use)
<         {
<         case IsXExtensionDevice:
< #ifdef IsXExtensionPointer
<         case IsXExtensionPointer:
< #endif
<             TRACE("Is XExtension%s\n", (devices[loop].use == IsXExtensionDevice)? "Device":"Pointer");
---
>         
>             LPWTI_CURSORS_INFO cursor;
>
>             TRACE("Is Extension Device\n");
547c538,539
<                 break;
---
>                 XFree(device_type);
>                 continue;
565c557,558
<                     break;
---
>                     XFree(device_type);
>                     continue;
579c572,573
<                 break;
---
>                 XFree(device_type);
>                 continue;
586a581
>                 XFree(device_type);
588c583
<                 break;
---
>                 continue;
627c622
<                         if (!axis_read_complete && cursor->TYPE == CSR_TYPE_PEN)
---
>                         if (!axis_read_complete && Val->num_axes >= 5 && cursor->TYPE == CSR_TYPE_PEN)
723,724c718
<             break;
<         }
---
>         
726a721
>

on wine 0.9.61 and recompiling it, pressure sensitivity in wine works under vector linux.

I would like to thank uelesk8s for the package of the driver- it works perfect.

wacdump still doesnt work,but i dont need it anyway.Wine works with tablets once again,yaaay...

Hopefully when ubuntu 8 gets to stable these issues will be fixed in the code on next wine/wacom tablet driver.I will keep you updated in this topic with info that i find on the subject.

Thanks to everybody ,you guys made this possible. ;D
Thanks to ubuntu community for the patch ;D

question:
do you want me to make a package of the patched version of wine?
I am going to make a howto set wacom tablet tomorow.
Title: Re: trying to install wacom drivers - Resolved (via a patch in wine)
Post by: uelsk8s on May 27, 2008, 03:18:10 pm
did you try the latest wine to see if the patch has already made it upstream?
Wine is at 1.0RC2 now
Title: Re: trying to install wacom drivers - Resolved (via a patch in wine)
Post by: M0E-lnx on May 27, 2008, 03:21:12 pm
congratulations. Nice to hear you've won the battle at last
Title: Re: trying to install wacom drivers - Resolved (via a patch in wine)
Post by: blurymind on May 28, 2008, 07:12:09 am
did you try the latest wine to see if the patch has already made it upstream?
Wine is at 1.0RC2 now
yes i did.The patch wasnt applied in wine 1.0rc2

Moe-thanks =) Im really glad im back to vector.I wanna make some new packages to celebrate it.
Title: Re: trying to install wacom drivers - Resolved (via a patch in wine)
Post by: M0E-lnx on May 28, 2008, 07:54:49 am
did you try the latest wine to see if the patch has already made it upstream?
Wine is at 1.0RC2 now
yes i did.The patch wasnt applied in wine 1.0rc2

Moe-thanks =) Im really glad im back to vector.I wanna make some new packages to celebrate it.

Nice to have you back buddy.
I can't believe we had lost a user because of something this simple ;)
Title: Re: trying to install wacom drivers - Resolved (via a patch in wine)
Post by: blurymind on May 28, 2008, 10:06:26 am
did you try the latest wine to see if the patch has already made it upstream?
Wine is at 1.0RC2 now
yes i did.The patch wasnt applied in wine 1.0rc2

Moe-thanks =) Im really glad im back to vector.I wanna make some new packages to celebrate it.

Nice to have you back buddy.
I can't believe we had lost a user because of something this simple ;)
hehe thanks. Its something this small that can be that important to a single user to switch temporarily..
If you have tablet and its pressure sensitivity doesnt work, its like having a guitar that lacks half of its strings.I just need to have it on every graphic drawing application that supports it.

Now that i'm here,im starting to feel the difference again.Compared to the bloated distros that had all the "out of the box" use experience, this baby is flying, i have all the development libraries,that were cut out to preserve hd space in other distros, and its easier and faster it seems to do just about anything.
Title: Re: trying to install wacom drivers - Resolved (via a patch in wine)
Post by: M-ake on May 28, 2008, 01:00:36 pm
Congraz blurymind. Can you try this one app for me ? About how well it works with wine && tablet http://sai.detstwo.com/sai/#

"PaintTool SAI English Pack 1.0 Full (1.67 mb)" is the thing u want (:. Lemme tell u, it spanks open canvas IMO as a painting app.
Title: Re: trying to install wacom drivers - Resolved (via a patch in wine)
Post by: blurymind on May 29, 2008, 06:35:49 am
Congraz blurymind. Can you try this one app for me ? About how well it works with wine && tablet http://sai.detstwo.com/sai/#

"PaintTool SAI English Pack 1.0 Full (1.67 mb)" is the thing u want (:. Lemme tell u, it spanks open canvas IMO as a painting app.
ahahahahahahahahaa  ;D

I've tried it long time ago my friend. In fact,I'm its appDB maintainer there:

http://appdb.winehq.org/objectManager.php?sClass=version&iId=11044
(theodore) the screenshot there is mine..

also,i filed a bug report here:
http://bugs.winehq.org/show_bug.cgi?id=11846

and wine dev heroes have looked into getting pressure sensitivity to work. Post a comment there or vote for sai..It might get the attention of devs to sai more.

the problem with sai is that it has its own tablet driver, Dan Kegel is trying to figure out how that thing works.Other than that its working perfectly fine in wine.I hope they get pressure working in sai soon.I love that app.


here is my patched version of wine:
http://blurymind.googlepages.com/wine-0.9.61-i386-1.tlz
pressure works in artrage and photoshop,but in open canvas its messed with this patch.
Title: Re: trying to install wacom drivers - Resolved (via a patch in wine)
Post by: blurymind on May 29, 2008, 11:06:08 am
i made the promissed howto here:

http://www.vectorlinux.com/forum2/index.php?topic=6458.0

hope this helps vector's user support/documentation

Title: Re: trying to install wacom drivers - Resolved (via a patch in wine)
Post by: M0E-lnx on May 29, 2008, 11:56:40 am
i made the promissed howto here:

http://www.vectorlinux.com/forum2/index.php?topic=6458.0

hope this helps vector's user support/documentation



That should probabbly go in the wiki
Title: Re: trying to install wacom drivers - Resolved (via a patch in wine)
Post by: the dsc on June 21, 2008, 01:20:35 pm
Hi everybody.

I currently use debian, but I'm willing to change to some other distro in which the tablet works perfectly under wine... (and also has a decent functioning of the programs under wine overall... it's unbelievable the disparity between the same windows' program running under lenny (testing) and etch (stable) - makes me suspicious that there's something deeply wrong with my etch's installation - but it also probably has a fairly old version of wine, while in lenny I have 1.0 already, so maybe that is all that is there to blame for it)

You guys were able to make it work perfectly (essentially meaning, the basics, absolute positioning, plus pressure sensivity) in many programs? With ArtWeaver and Deep Paint 2 specifically?

I can get it working in ArtRage and somewhat in Open Canvas. ArtRage is perfect, almost unbelievably good (far better than native Gimp, and I won't even mention Krita), but Open Canvas gets the vertical axis inverted for some reason. ArtRage weirdly will do that as well, if the option "precise tablet" is enabled.

I've tried to install the tablet's windows driver under wine, but I think it's worthless, as I've read some things about it later...



I'll eventually check the source code of wine and see how is that part of the patch mentioned here, seems different, bigger, from other patches I've seen around, perhaps I could just add this patch and stick with debian lenny.