From: Egbert Eich Date: Tue Feb 11 12:51:32 2014 +0100 Subject: [PATCH 4/4]Log BUTTON HIGH LEVEL events Patch-Mainline: never Git-commit: 128d0302b04fb71b9d652a99fd0ad9b780374f44 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/wcmCommon.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) Index: xf86-input-wacom-0.37.0/src/wcmCommon.c =================================================================== --- xf86-input-wacom-0.37.0.orig/src/wcmCommon.c +++ xf86-input-wacom-0.37.0/src/wcmCommon.c @@ -346,9 +346,17 @@ static void sendAButton(InputInfoPtr pIn #ifdef DEBUG WacomCommonPtr common = priv->common; #endif - - DBG(4, priv, "TPCButton(%s) button=%d state=%d\n", - common->wcmTPCButton ? "on" : "off", button, mask); + if (DO_LOG(common, LOG_BUTTON_HIGH)) { + int x = (first_val == 0 && num_val >= 1) ? + (int)((double)valuators[0] * 1.0) : -1; + int y = (first_val <= 1 && first_val + num_val > 1) ? + (int)((double)(valuators[1 - first_val]) * 1.0) : -1; + LOG(common, LOG_BUTTON_HIGH, + "TPCButton(%s) button=%d state=%d x=%d y=%d\n", + common->wcmTPCButton ? "on" : "off", button, mask, x, y); + } else + DBG(4, priv, "TPCButton(%s) button=%d state=%d\n", + common->wcmTPCButton ? "on" : "off", button, mask); if (!priv->keys[button][0]) return;