Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 221117 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/util/xidump.c (-6 / +23 lines)
Lines 2-8 Link Here
2
** xidump.c
2
** xidump.c
3
**
3
**
4
** Copyright (C) 2003 - 2004 - John E. Joganic
4
** Copyright (C) 2003 - 2004 - John E. Joganic
5
** Copyright (C) 2004 - 2007 - Ping Cheng 
5
** Copyright (C) 2004 - 2008 - Ping Cheng 
6
**
6
**
7
** This program is free software; you can redistribute it and/or
7
** This program is free software; you can redistribute it and/or
8
** modify it under the terms of the GNU General Public License
8
** modify it under the terms of the GNU General Public License
Lines 30-35 Link Here
30
**   2006-05-05 0.7.4 - Removed older 2.6 kernels
30
**   2006-05-05 0.7.4 - Removed older 2.6 kernels
31
**   2006-07-19 0.7.5 - Support buttons and keys combined
31
**   2006-07-19 0.7.5 - Support buttons and keys combined
32
**   2007-01-10 0.7.7 - Don't list uninitialized tools
32
**   2007-01-10 0.7.7 - Don't list uninitialized tools
33
**   2008-05-06 0.8.0 - Support Xorg 7.3 or later
33
**
34
**
34
****************************************************************************/
35
****************************************************************************/
35
36
Lines 41-47 Link Here
41
#include <sys/time.h>
42
#include <sys/time.h>
42
#include <math.h>
43
#include <math.h>
43
44
44
#define XIDUMP_VERSION "0.7.7"
45
#define XIDUMP_VERSION "0.8.0"
45
46
46
#include "../include/util-config.h"
47
#include "../include/util-config.h"
47
48
Lines 52-57 Link Here
52
#include <X11/Xlib.h>
53
#include <X11/Xlib.h>
53
#include <X11/extensions/XInput.h>
54
#include <X11/extensions/XInput.h>
54
#include <X11/extensions/XIproto.h>
55
#include <X11/extensions/XIproto.h>
56
#include <X11/keysym.h>
55
57
56
	enum
58
	enum
57
	{
59
	{
Lines 156-163 int ListDevices(Display* pDisp, const char* pszDeviceName) Link Here
156
				(pDev->use == 0) ? "disabled" :
158
				(pDev->use == 0) ? "disabled" :
157
				(pDev->use == IsXKeyboard) ? "keyboard" :
159
				(pDev->use == IsXKeyboard) ? "keyboard" :
158
				(pDev->use == IsXPointer) ? "pointer" :
160
				(pDev->use == IsXPointer) ? "pointer" :
159
				(pDev->use == IsXExtensionDevice) ? "extension" :
161
#ifndef WCM_ISXEXTENSIONPOINTER
160
					"unknown");
162
				(pDev->use == IsXExtensionDevice) ? 
163
#else
164
				(pDev->use == IsXExtensionDevice || 
165
				 pDev->use == IsXExtensionKeyboard || 
166
				 pDev->use == IsXExtensionPointer) ? 
167
#endif
168
					"extension" : "unknown");
161
169
162
		if (gnVerbose)
170
		if (gnVerbose)
163
		{
171
		{
Lines 444-450 static int CursesRun(Display* pDisp, XDeviceInfo* pDevInfo, FORMATTYPE fmt) Link Here
444
	nTitleRow = nRow;
452
	nTitleRow = nRow;
445
	if (pValInfo)
453
	if (pValInfo)
446
	{
454
	{
447
		snprintf(chBuf,sizeof(chBuf),"Valuators: %s   ID: Undefined  Serial Number: Undefined",
455
		snprintf(chBuf,sizeof(chBuf),"Valuators: %s   ID: Unreported  Serial Number: Unreported",
448
				pValInfo->mode == Absolute ? "Absolute" :
456
				pValInfo->mode == Absolute ? "Absolute" :
449
				pValInfo->mode == Relative ? "Relative" : "Unknown");
457
				pValInfo->mode == Relative ? "Relative" : "Unknown");
450
		wacscrn_output(nRow,0,chBuf);
458
		wacscrn_output(nRow,0,chBuf);
Lines 539-551 static int CursesRun(Display* pDisp, XDeviceInfo* pDevInfo, FORMATTYPE fmt) Link Here
539
			else
547
			else
540
			{
548
			{
541
				/* title value */
549
				/* title value */
542
				int v = (pMove->axis_data[3]&0xffff0000) >> 16;
543
				snprintf(chBuf,sizeof(chBuf),"%s",
550
				snprintf(chBuf,sizeof(chBuf),"%s",
544
					pValInfo->mode == Absolute ? "Absolute" :
551
					pValInfo->mode == Absolute ? "Absolute" :
545
					pValInfo->mode == Relative ? "Relative" : "Unknown");
552
					pValInfo->mode == Relative ? "Relative" : "Unknown");
546
				wacscrn_output(nTitleRow,11,chBuf);
553
				wacscrn_output(nTitleRow,11,chBuf);
554
555
				/* Device/tool ID can only be retrieved through the ToolID option 
556
				 * of xsetwacom due to valuator backward compatibility concern
557
				 *
558
				v = (pMove->axis_data[3]&0xffff0000) >> 16;
547
				snprintf(chBuf, sizeof(chBuf), "%10d", v);
559
				snprintf(chBuf, sizeof(chBuf), "%10d", v);
548
				wacscrn_output(nTitleRow, 25, chBuf);
560
				wacscrn_output(nTitleRow, 25, chBuf);
561
562
				 * serial number can only be retrieved through the ToolSerial option
563
				 * of xsetwacom due to valuator backward compatibility concern
564
				 *
549
				v = (pMove->axis_data[4]&0xffff0000) | 
565
				v = (pMove->axis_data[4]&0xffff0000) | 
550
							((pMove->axis_data[5]&0xffff0000)>>16);
566
							((pMove->axis_data[5]&0xffff0000)>>16);
551
				if ( v )
567
				if ( v )
Lines 553-558 static int CursesRun(Display* pDisp, XDeviceInfo* pDevInfo, FORMATTYPE fmt) Link Here
553
					snprintf(chBuf,sizeof(chBuf), "%12d", v);
569
					snprintf(chBuf,sizeof(chBuf), "%12d", v);
554
					wacscrn_output(nTitleRow,52,chBuf);
570
					wacscrn_output(nTitleRow,52,chBuf);
555
				}
571
				}
572
				*/
556
573
557
				for (k=0; k<pValInfo->num_axes && k<3; ++k)
574
				for (k=0; k<pValInfo->num_axes && k<3; ++k)
558
				{
575
				{
(-)a/src/wacomxi/wacomcpl-exec (-1 / +5 lines)
Lines 192-198 proc calibrationSequence {which xDev yDev} { Link Here
192
	set type $getDeviceModel($device,type)
192
	set type $getDeviceModel($device,type)
193
	if { ![ string compare $type "stylus" ] } {
193
	if { ![ string compare $type "stylus" ] } {
194
	    set eraser $getDeviceModel($device,eraser)
194
	    set eraser $getDeviceModel($device,eraser)
195
	    if { [ string compare $eraser $device ] } {
195
	    if { [ string compare $eraser $device ] && $eraser != "" } {
196
		updateXinitrc $eraser topx $xDevMin
196
		updateXinitrc $eraser topx $xDevMin
197
		updateXinitrc $eraser topy $yDevMin
197
		updateXinitrc $eraser topy $yDevMin
198
		updateXinitrc $eraser bottomx $xDevMax
198
		updateXinitrc $eraser bottomx $xDevMax
Lines 502-507 proc createDeviceList {} { Link Here
502
    grid .workingDev.sb -row 2 -sticky nse
502
    grid .workingDev.sb -row 2 -sticky nse
503
    set flag 0
503
    set flag 0
504
    foreach dev $devices {
504
    foreach dev $devices {
505
	# initial related erasers for styli
506
	set getDeviceModel($dev,eraser) ""
507
    }
508
    foreach dev $devices {
505
	.workingDev.list insert end $dev
509
	.workingDev.list insert end $dev
506
	createScreenList $dev
510
	createScreenList $dev
507
	set type $getDeviceModel($dev,type)
511
	set type $getDeviceModel($dev,type)
(-)a/src/xdrv/wcmCommon.c (-3 / +4 lines)
Lines 1597-1603 static void commonDispatchDevice(WacomCommonPtr common, unsigned int channel, Link Here
1597
1597
1598
			if (priv->oldProximity)
1598
			if (priv->oldProximity)
1599
			{
1599
			{
1600
				if (abs(filtered.distance - common->wcmMaxCursorDist) > common->wcmCursorProxoutDist)
1600
				if (abs(filtered.distance - common->wcmMaxCursorDist) 
1601
						> common->wcmCursorProxoutDist)
1601
					filtered.proximity = 0;
1602
					filtered.proximity = 0;
1602
			}
1603
			}
1603
			/* once it is out. Don't let it in until a hard in */
1604
			/* once it is out. Don't let it in until a hard in */
Lines 1694-1703 int xf86WcmInitTablet(LocalDevicePtr local, const char* id, float version) Link Here
1694
1695
1695
	/* output tablet state as probed */
1696
	/* output tablet state as probed */
1696
	if (xf86Verbose)
1697
	if (xf86Verbose)
1697
		ErrorF("%s Wacom %s tablet speed=%d maxX=%d maxY=%d maxZ=%d "
1698
		ErrorF("%s Wacom %s tablet speed=%d (%d) maxX=%d maxY=%d maxZ=%d "
1698
			"resX=%d resY=%d  tilt=%s\n",
1699
			"resX=%d resY=%d  tilt=%s\n",
1699
			XCONFIG_PROBED,
1700
			XCONFIG_PROBED,
1700
			model->name, common->wcmLinkSpeed,
1701
			model->name, common->wcmLinkSpeed, common->wcmISDV4Speed, 
1701
			common->wcmMaxX, common->wcmMaxY, common->wcmMaxZ,
1702
			common->wcmMaxX, common->wcmMaxY, common->wcmMaxZ,
1702
			common->wcmResolX, common->wcmResolY,
1703
			common->wcmResolX, common->wcmResolY,
1703
			HANDLE_TILT(common) ? "enabled" : "disabled");
1704
			HANDLE_TILT(common) ? "enabled" : "disabled");
(-)a/src/xdrv/wcmISDV4.c (-12 / +12 lines)
Lines 71-77 static Bool isdv4Init(LocalDevicePtr local, char* id, float *version) Link Here
71
71
72
	DBG(1, priv->debugLevel, ErrorF("initializing ISDV4 tablet\n"));
72
	DBG(1, priv->debugLevel, ErrorF("initializing ISDV4 tablet\n"));
73
73
74
	/* Try 38400 first */
74
	/* Initial baudrate is 38400 */
75
	if (xf86WcmSetSerialSpeed(local->fd, common->wcmISDV4Speed) < 0)
75
	if (xf86WcmSetSerialSpeed(local->fd, common->wcmISDV4Speed) < 0)
76
		return !Success;
76
		return !Success;
77
77
Lines 96-101 static int isdv4Query(LocalDevicePtr local, const char* query, char* data) Link Here
96
	WacomDevicePtr priv = (WacomDevicePtr)local->private;
96
	WacomDevicePtr priv = (WacomDevicePtr)local->private;
97
	WacomCommonPtr common =	priv->common;
97
	WacomCommonPtr common =	priv->common;
98
98
99
	DBG(1, priv->debugLevel, ErrorF("Querying ISDV4 tablet\n"));
100
99
	/* Send stop command to the tablet */
101
	/* Send stop command to the tablet */
100
	err = xf86WcmWrite(local->fd, query, strlen(query));
102
	err = xf86WcmWrite(local->fd, query, strlen(query));
101
	if (err == -1)
103
	if (err == -1)
Lines 119-146 static int isdv4Query(LocalDevicePtr local, const char* query, char* data) Link Here
119
	/* Read the control data */
121
	/* Read the control data */
120
	if (!xf86WcmWaitForTablet(local->fd, data, 11))
122
	if (!xf86WcmWaitForTablet(local->fd, data, 11))
121
	{
123
	{
122
		ErrorF("Wacom unable to read ISDV4 control data "
123
			"after %d tries\n", MAXTRY);
124
		return !Success;
125
	}
126
127
	/* Control data bit check */
128
	if ( !(data[0] & 0x40) ) /* baudrate too high? */
129
	{
130
		/* Try 19200 now */
124
		/* Try 19200 now */
131
		if (common->wcmISDV4Speed != 19200)
125
		if (common->wcmISDV4Speed != 19200)
132
		{
126
		{
133
			common->wcmISDV4Speed = 19200;
127
			common->wcmISDV4Speed = 19200;
134
			if(isdv4Init(local, NULL, NULL) != Success)
128
			if (xf86WcmSetSerialSpeed(local->fd, common->wcmISDV4Speed) < 0)
135
				return !Success;
129
				return !Success;
136
			return isdv4GetRanges(local);
130
			return isdv4Query(local, query, data);
137
		}
131
		}
138
		else
132
		else
139
		{
133
		{
140
			ErrorF("Wacom Query ISDV4 error magic error in %s query\n", query);
134
			ErrorF("Wacom unable to read ISDV4 control data "
135
				"after %d tries\n", MAXTRY);
141
			return !Success;
136
			return !Success;
142
		}
137
		}
143
	}
138
	}
139
144
	return Success;
140
	return Success;
145
}
141
}
146
142
Lines 231-236 static int isdv4GetRanges(LocalDevicePtr local) Link Here
231
		}
227
		}
232
	}
228
	}
233
229
230
	DBG(2, priv->debugLevel, ErrorF("isdv4GetRanges speed=%d maxX=%d maxY=%d "
231
		"maxZ=%d resX=%d resY=%d \n", common->wcmISDV4Speed, 
232
		common->wcmMaxX, common->wcmMaxY, common->wcmMaxZ,
233
		common->wcmResolX, common->wcmResolY));
234
	return Success;
234
	return Success;
235
}
235
}
236
236
(-)a/src/xdrv/xf86Wacom.c (-1 / +2 lines)
Lines 68-76 Link Here
68
 * 2008-02-27 47-pc0.7.9-8 - Support Cintiq 20
68
 * 2008-02-27 47-pc0.7.9-8 - Support Cintiq 20
69
 * 2008-03-07 47-pc0.7.9-9 - Support keystrokes in wacomcpl
69
 * 2008-03-07 47-pc0.7.9-9 - Support keystrokes in wacomcpl
70
 * 2008-04-07 47-pc0.7.9-11 - Synchronized databases
70
 * 2008-04-07 47-pc0.7.9-11 - Synchronized databases
71
 * 2008-05-06 47-pc0.8.0-1 - new release
71
 */
72
 */
72
73
73
static const char identification[] = "$Identification: 47-0.7.9-11 $";
74
static const char identification[] = "$Identification: 47-0.8.0-1 $";
74
75
75
/****************************************************************************/
76
/****************************************************************************/
76
77

Return to bug 221117