From: Egbert Eich Date: Sun Feb 16 09:30:42 2014 +0100 Subject: [PATCH 2/4]Log PROXIMITY LOW LEVEL events Patch-Mainline: never Git-commit: df73852a08ab8b8ab3c2b04b7dea8386cceb64eb Git-repo: git://linuxwacom.git.sourceforge.net/gitroot/linuxwacom/xf86-input-wacom References: FATE# Signed-off-by: Egbert Eich Signed-off-by: Egbert Eich --- src/wcmUSB.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) Index: xf86-input-wacom-0.39.0/src/wcmUSB.c =================================================================== --- xf86-input-wacom-0.39.0.orig/src/wcmUSB.c +++ xf86-input-wacom-0.39.0/src/wcmUSB.c @@ -565,6 +565,8 @@ static void usbWcmInitPadState(InputInfo ds->device_type = PAD_ID; ds->device_id = PAD_DEVICE_ID; ds->serial_num = channel; + LOG(common, LOG_PROXIMITY_LOW, "Proximity in for %s PAD serial -1\n", + pInfo->name); } int usbWcmGetRanges(InputInfoPtr pInfo) @@ -1870,6 +1872,7 @@ static void usbDispatchEvents(InputInfoP int channel; wcmUSBData* private = common->private; WacomDeviceState dslast = common->wcmChannel[private->lastChannel].valid.state; + int log_proximity; DBG(6, common, "%d events received\n", private->wcmEventCnt); @@ -1906,6 +1909,7 @@ static void usbDispatchEvents(InputInfoP ds = &common->wcmChannel[channel].work; dslast = common->wcmChannel[channel].valid.state; + log_proximity = ds->proximity; if (ds->device_type && ds->device_type != private->wcmDeviceType) LogMessageVerbSigSafe(X_ERROR, 0, @@ -1920,10 +1924,16 @@ static void usbDispatchEvents(InputInfoP /* all USB data operates from previous context except relative values*/ ds->relwheel = 0; ds->serial_num = private->wcmLastToolSerial; + if (log_proximity != ds->proximity) + LOG(common, LOG_PROXIMITY_LOW, "Proximity in for %s %s serial %d\n", + pInfo->name, + usbTypeName(ds->device_type), + private->wcmLastToolSerial); /* loop through all events in group */ for (i=0; iwcmEventCnt; ++i) { + log_proximity = ds->proximity; event = private->wcmEvents + i; DBG(11, common, "event[%d]->type=%d code=%d value=%d\n", @@ -1977,6 +1987,12 @@ static void usbDispatchEvents(InputInfoP usbParseKeyEvent(common, event, channel); usbParseBTNEvent(common, event, btn_channel); } + if (log_proximity != ds->proximity) + LOG(common, LOG_PROXIMITY_LOW, "Proximity %s for %s %s serial %d\n", + ds->proximity ? "in" : "out", + pInfo->name, + usbTypeName(ds->device_type), + private->wcmLastToolSerial); } /* next event */ /* DTF720 and DTF720a don't support eraser */