xserver/hw/kdrive/linux tslib.c,1.8,1.9

Phil Blundell xserver-commit at pdx.freedesktop.org
Wed Jun 2 13:49:52 PDT 2004


Committed by: pb

Update of /cvs/xserver/xserver/hw/kdrive/linux
In directory pdx:/tmp/cvs-serv2477/hw/kdrive/linux

Modified Files:
	tslib.c 
Log Message:
2004-06-02  Philip Blundell  <philb at gnu.org>

	* configure.ac (XCALIBRATE): New conditional.
	(REQUIRED_MODULES): Demand xcalibrateext if building XCalibrate.
	* Xext/xcalibrate.c: New file.
	* Xext/Makefile.am (libXext_a_SOURCES) [XCALIBRATE=yes]: Add
	xcalibrate.c.
	* hw/kdrive/linux/tslib.c (TsRead): Read raw events if requested.



Index: tslib.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/linux/tslib.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- a/tslib.c	6 Nov 2003 14:01:46 -0000	1.8
+++ b/tslib.c	2 Jun 2004 20:49:50 -0000	1.9
@@ -62,7 +62,8 @@
 static long lastx = 0, lasty = 0;
 static struct tsdev *tsDev = NULL;
 
-/* extern int TSLibWantRawData;  */
+void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure);
+void *tslib_raw_event_closure;
 
 int KdTsPhyScreen = 0;
 
@@ -75,11 +76,14 @@
     long	    x, y;
     unsigned long   flags;
 
-    /*
-    if (TSLibWantRawData)
-      n = ts_read_raw(tsDev, &event, 1);
-    else
-    */
+    if (tslib_raw_event_hook)
+      {
+	if (ts_read_raw(tsDev, &event, 1) == 1)
+	  {
+	    tslib_raw_event_hook (event.x, event.y, event.pressure, tslib_raw_event_closure);
+	  }
+	return;
+      }
 
     n = ts_read(tsDev, &event, 1);
 




More information about the xserver-commit mailing list