Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | From Grazvydas Ignotas |
| 2 | |
| 3 | At least xserver 1.7.4 crashes on XGetPointerControl request because of xf86-input-tslib: |
| 4 | |
| 5 | Program received signal SIGSEGV, Segmentation fault. |
| 6 | #0 0x000355e0 in ProcGetPointerControl (client=0x4a2e58) at devices.c:2122 |
| 7 | #1 0x00062fa8 in Dispatch () at dispatch.c:439 |
| 8 | #2 0x00022444 in main (argc=4, argv=0xbeebedc4, envp=0xbeebedd8) at main.c:285 |
| 9 | |
| 10 | This happens because ptrfeed field is not set in device structure from tslib. |
| 11 | To fix this, call InitPtrFeedbackClassDeviceStruct() during DEVICE_INIT to get necessary setup done (as done in other input drivers). |
| 12 | |
| 13 | --- |
| 14 | diff -ur xf86-input-tslib-0.0.6/src/tslib.c xf86-input-tslib-0.0.6_/src/tslib.c |
| 15 | --- xf86-input-tslib-0.0.6/src/tslib.c 2010-02-09 12:23:22.000000000 +0200 |
| 16 | +++ xf86-input-tslib-0.0.6_/src/tslib.c 2010-02-09 12:37:33.000000000 +0200 |
| 17 | @@ -103,8 +103,6 @@ |
| 18 | static void |
| 19 | PointerControlProc(DeviceIntPtr dev, PtrCtrl * ctrl) |
| 20 | { |
| 21 | - ErrorF("%s\n", __FUNCTION__); |
| 22 | - return; |
| 23 | } |
| 24 | |
| 25 | static Bool |
| 26 | @@ -406,6 +404,8 @@ |
| 27 | xf86MotionHistoryAllocate(pInfo); |
| 28 | #endif |
| 29 | |
| 30 | + if (!InitPtrFeedbackClassDeviceStruct(device, PointerControlProc)) |
| 31 | + return !Success; |
| 32 | break; |
| 33 | |
| 34 | case DEVICE_ON: |