Attachment 'hidtouch.patch'
Download 1 diff -ru orig/xf86-input-hidtouch-9.04.04/src/hidtouch__body.h xf86-input-hidtouch-9.04.04/src/hidtouch__body.h
2 --- orig/xf86-input-hidtouch-9.04.04/src/hidtouch__body.h 2009-04-04 09:07:54.000000000 +0200
3 +++ xf86-input-hidtouch-9.04.04/src/hidtouch__body.h 2009-12-23 21:19:45.253952702 +0100
4 @@ -112,7 +112,6 @@
5 hdtOnDeviceOff(DeviceIntPtr device)
6 {
7 InputInfoPtr pInfo = device->public.devicePrivate;
8 - HdtDevicePtr pDevice = pInfo->private;
9
10 xf86Msg(X_INFO, "%s: Off.\n", pInfo->name);
11 if (!device->public.on)
12 @@ -171,7 +170,7 @@
13
14
15 if (!InitValuatorClassDeviceStruct(device,
16 - num_axes, GetMotionHistory, GetMotionHistorySize(),
17 + num_axes, GetMotionHistorySize(),
18 Absolute))
19 {
20 return BadAlloc;
21 @@ -424,10 +423,10 @@
22 int trans_y = y ;
23 hdtOnReadInput__supportXrandr(pInfo, &trans_x, &trans_y);
24
25 - /* /
26 + /*
27 xf86Msg(X_INFO, "Position : %i, %i ==> %i, %i.\n",
28 x, y, trans_x, trans_y);
29 - /* */
30 + */
31 xf86PostMotionEvent(pInfo->dev, 1
32 , 0, 2
33 , trans_x, trans_y);
34 diff -ru orig/xf86-input-hidtouch-9.04.04/src/hidtouch__HdtRawData.h xf86-input-hidtouch-9.04.04/src/hidtouch__HdtRawData.h
35 --- orig/xf86-input-hidtouch-9.04.04/src/hidtouch__HdtRawData.h 2008-11-01 08:59:18.000000000 +0100
36 +++ xf86-input-hidtouch-9.04.04/src/hidtouch__HdtRawData.h 2009-12-23 20:36:51.950286938 +0100
37 @@ -34,25 +34,33 @@
38 /*int op_code ;
39 int op_value ;*/
40
41 + int done_p = 0;
42 + int done_x = 0;
43 + int done_y = 0;
44 +
45 for(i=0; i<(configuration->packetCount) ; i++) {
46 read(pInfo->fd, &packet, sizeof(packet)) ;
47 /*op_code = HdtRawData__fillFromInputInfo__readInt(pInfo) ;*/
48 /*op_value = HdtRawData__fillFromInputInfo__readInt(pInfo) ;*/
49 /*xf86Msg(X_INFO, "Read packet : \t%x\t%x\n", op_code, op_value);*/
50
51 - if(packet.hid == op_code_setup->pressure)
52 + if((packet.hid == op_code_setup->pressure) && (!done_p))
53 {
54 hdtRawData->pressure = (0 == packet.value)
55 ? HDT__RAW_DATA__IS_NOT_PRESSED
56 : HDT__RAW_DATA__IS_PRESSED ;
57 +
58 + done_p = 1;
59 }
60 - else if(packet.hid == op_code_setup->x)
61 + else if((packet.hid == op_code_setup->x) && (!done_x))
62 {
63 hdtRawData->x = packet.value ;
64 + done_x = 1;
65 }
66 - else if(packet.hid == op_code_setup->y)
67 + else if((packet.hid == op_code_setup->y) && (!done_y))
68 {
69 hdtRawData->y = packet.value ;
70 + done_y = 1;
71 }
72 }
73 }
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.