more debug

This commit is contained in:
Brian 2007-03-30 13:43:15 -06:00
parent 92e8cdbd32
commit 1ea842960f
3 changed files with 15 additions and 13 deletions

View File

@ -464,9 +464,8 @@ void dmxBackendCollectEvents(DevicePtr pDev,
#if 11/*BP*/
case ButtonPress:
case ButtonRelease:
/*
ErrorF("press/release at %d, %d\n", X.xbutton.x, X.xbutton.y);
*/
/* fall-through */
#endif
default:
/* Pass the whole event here, because

View File

@ -638,9 +638,7 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
/*pDev*/p,
/*KeyPress*/type,
/*n*/detail);
/*
ErrorF("NEW KEY EVENT %d n=%d\n", detail, nevents);
*/
ErrorF("KEY %d n=%d\n", detail, nevents);
for (i = 0; i < nevents; i++)
mieqEnqueue(p, events + i);
xfree(events);
@ -659,6 +657,10 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
xEvent *events = Xcalloc(sizeof(xEvent), GetMaximumEventsNum());
valuators[0] = e->xbutton.x;
valuators[1] = e->xbutton.y;
/*
valuators[0] = dmxGlobalX;
valuators[1] = dmxGlobalY;
*/
valuators[2] = e->xbutton.button;
nevents = GetPointerEvents(events,
/*pDev*/p,
@ -666,11 +668,10 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
detail,
POINTER_ABSOLUTE,
0, 0, valuators);
/*
ErrorF("NEW PTR EVENT %d (%d,%d,%d) n=%d\n",
detail, valuators[0], valuators[1], valuators[2],
nevents);
*/
ErrorF("BUTTON %d, %d %d n=%d\n",
valuators[0], valuators[1], valuators[2], nevents);
for (i = 0; i < nevents; i++)
mieqEnqueue(p, events + i);
xfree(events);
@ -698,6 +699,7 @@ void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym,
detail,
POINTER_ABSOLUTE,
0, 0, valuators);
ErrorF("MOTION %d, %d n = %d\n", valuators[0], valuators[1], nevents);
/*
ErrorF("NEW MOTION %d st %d (%d,%d,%d) n=%d\n",
detail, e->xmotion.state,

View File

@ -503,10 +503,11 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what)
GetMaximumEventsNum(),
#endif
Relative);
ErrorF("MOTION BUFFER SIZE %d\n", GetMaximumEventsNum());
#ifdef XINPUT
for (i = 0; i < info.numRelAxes; i++)
InitValuatorAxisStruct(pDevice, i, info.minval[0],
info.maxval[0], info.res[0],
/*1280*/info.maxval[0], info.res[0],
info.minres[0], info.maxres[0]);
#endif
} else if (info.numRelAxes) {
@ -517,7 +518,7 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what)
#ifdef XINPUT
for (i = 0; i < info.numRelAxes; i++)
InitValuatorAxisStruct(pDevice, i, info.minval[0],
info.maxval[0], info.res[0],
/*1280*/info.maxval[0], info.res[0],
info.minres[0], info.maxres[0]);
#endif
} else if (info.numAbsAxes) {
@ -528,7 +529,7 @@ static int dmxDeviceOnOff(DeviceIntPtr pDevice, int what)
#ifdef XINPUT
for (i = 0; i < info.numAbsAxes; i++)
InitValuatorAxisStruct(pDevice, i+info.numRelAxes,
info.minval[i+1], info.maxval[i+1],
info.minval[i+1], /*1280*/info.maxval[i+1],
info.res[i+1], info.minres[i+1],
info.maxres[i+1]);
#endif