I send it again 'cause gmail broke the patch

Hi Everybody,

I'm new to linux driver developement but I'd like to get my tablet pc
work fine with linux fedora imaging tools
So I decided to participate
I installed a fedora 12 on which I manage to install a patched driver of
xorg-x11-drv-wacom
The patch permit to bind the TC1100 Tablet buttons (usable only with the
stylus) to wacom buttons 30,31,32

Now I've the ambition to get this patch included upstream, so that next
version will have this binding out of the box.

However, I installed a Fedora 13 , refresh the patch and I patched
xorg-x11-drv-wacom 10.8
I validated the patch using trace, but I did not manage to bind the
buttons 30,31,32 with xbindkeys on F13
This is working fine on F12 but no button is seen on F13

Actually the Right Button (Barrel Button of stylus) is not seen neither
on F13 while It was on F12.

So I have 2 requests.
1. Can you have a look at this patch and maybe integrate it for the
community
2. It seems there is something wrong with event from serial tablet on fedora 13
see https://bugzilla.redhat.com/show_bug.cgi?id=572096

Thank you for your time on my long message
Cheers
Pierre
diff -rU4 xf86-input-wacom-0.10.8-orig/src/wcmISDV4.c xf86-input-wacom-0.10.8-mine/src/wcmISDV4.c
--- xf86-input-wacom-0.10.8-orig/src/wcmISDV4.c	2010-08-03 22:11:14.732261944 +0200
+++ xf86-input-wacom-0.10.8-mine/src/wcmISDV4.c	2010-08-04 03:29:50.524223062 +0200
@@ -631,8 +631,46 @@
 			wcmEvent(common, channel, &out);
 		}
 	}
 
+	/* handle TC1100 stylus buttons */
+	if ((data[0] == 0xC1) && ((data[1] & 0xF0) == 0))
+	{
+	
+		FILE* f = fopen("/tmp/wcmlog.txt","a");
+		fprintf(f,"isdv4Parse Tablet Button %d %s\n", common->wcmMaxZ,
+		data[1] == 0x1 ? "rotate"
+		 : data[1] == 0x2 ? "journal"
+		 : data[1] == 0x4 ? "keyboard"
+		 : "unknown");
+		fclose(f);
+		DBG(2, priv->debugLevel, ErrorF("isdv4Parse Tablet Button %d %s\n", common->wcmMaxZ, 
+		data[1] == 0x1 ? "rotate"
+		 : data[1] == 0x2 ? "journal"
+		 : data[1] == 0x4 ? "keyboard"
+		 : "unknown" ));
+	     
+		/* do not reset relative values here */
+		ds = &common->wcmChannel[channel].work;
+		 
+		/* first send the tablet button press event */
+		ds->proximity = 1;
+		ds->buttons = ((int)data[1]) << 29;
+		ds->pressure = common->wcmMaxZ;
+		ds->device_id = STYLUS_DEVICE_ID;
+		ds->device_type = STYLUS_ID;
+		wcmEvent(common, channel, ds);
+		  
+		/* then immediately after send the release event */
+		ds->buttons = 0;
+		ds->pressure = 0;
+		ds->proximity = 0;
+		wcmEvent(common, channel, ds);
+
+		return common->wcmPktLength;
+	}
+
+
 	/* Coordinate data bit check */
 	if (data[0] & CONTROL_BIT) /* control data */
 		return common->wcmPktLength;
 	else if ((n = wcmSerialValidate(local,data)) > 0)


------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to