dix/events, mi/eq: remove utterly ridiculous debugging
Remove debugging which can cause long-lived Xorg logs to grow well above 1GB if built with --enable-debug.
This commit is contained in:
parent
518db35ca3
commit
2cf1098436
67
dix/events.c
67
dix/events.c
|
@ -211,9 +211,6 @@ _X_EXPORT CallbackListPtr DeviceEventCallback;
|
||||||
Mask DontPropagateMasks[DNPMCOUNT];
|
Mask DontPropagateMasks[DNPMCOUNT];
|
||||||
static int DontPropagateRefCnts[DNPMCOUNT];
|
static int DontPropagateRefCnts[DNPMCOUNT];
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
static int debug_events = 0;
|
|
||||||
#endif
|
|
||||||
_X_EXPORT InputInfo inputInfo;
|
_X_EXPORT InputInfo inputInfo;
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
|
@ -1536,9 +1533,8 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask,
|
||||||
int i;
|
int i;
|
||||||
int type;
|
int type;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG_EVENTS
|
||||||
if (debug_events) ErrorF(
|
ErrorF("Event([%d, %d], mask=0x%x), client=%d",
|
||||||
"Event([%d, %d], mask=0x%x), client=%d",
|
|
||||||
pEvents->u.u.type, pEvents->u.u.detail, mask, client->index);
|
pEvents->u.u.type, pEvents->u.u.detail, mask, client->index);
|
||||||
#endif
|
#endif
|
||||||
if ((client) && (client != serverClient) && (!client->clientGone) &&
|
if ((client) && (client != serverClient) && (!client->clientGone) &&
|
||||||
|
@ -1554,9 +1550,9 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask,
|
||||||
if (WID(inputInfo.pointer->valuator->motionHintWindow) ==
|
if (WID(inputInfo.pointer->valuator->motionHintWindow) ==
|
||||||
pEvents->u.keyButtonPointer.event)
|
pEvents->u.keyButtonPointer.event)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG_EVENTS
|
||||||
if (debug_events) ErrorF("\n");
|
ErrorF("\n");
|
||||||
fprintf(stderr,"motionHintWindow == keyButtonPointer.event\n");
|
ErrorF("motionHintWindow == keyButtonPointer.event\n");
|
||||||
#endif
|
#endif
|
||||||
return 1; /* don't send, but pretend we did */
|
return 1; /* don't send, but pretend we did */
|
||||||
}
|
}
|
||||||
|
@ -1594,15 +1590,15 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask,
|
||||||
}
|
}
|
||||||
|
|
||||||
WriteEventsToClient(client, count, pEvents);
|
WriteEventsToClient(client, count, pEvents);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG_EVENTS
|
||||||
if (debug_events) ErrorF( " delivered\n");
|
ErrorF( " delivered\n");
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG_EVENTS
|
||||||
if (debug_events) ErrorF("\n");
|
ErrorF("\n");
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -2782,8 +2778,7 @@ drawable.id:0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if ((xkbDebugFlags&0x4)&&
|
if (((xE->u.u.type==KeyPress)||(xE->u.u.type==KeyRelease))) {
|
||||||
((xE->u.u.type==KeyPress)||(xE->u.u.type==KeyRelease))) {
|
|
||||||
ErrorF("CoreProcessKbdEvent: Key %d %s\n",key,
|
ErrorF("CoreProcessKbdEvent: Key %d %s\n",key,
|
||||||
(xE->u.u.type==KeyPress?"down":"up"));
|
(xE->u.u.type==KeyPress?"down":"up"));
|
||||||
}
|
}
|
||||||
|
@ -2869,8 +2864,7 @@ FixKeyState (register xEvent *xE, register DeviceIntPtr keybd)
|
||||||
kptr = &keyc->down[key >> 3];
|
kptr = &keyc->down[key >> 3];
|
||||||
bit = 1 << (key & 7);
|
bit = 1 << (key & 7);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if ((xkbDebugFlags&0x4)&&
|
if (((xE->u.u.type==KeyPress)||(xE->u.u.type==KeyRelease))) {
|
||||||
((xE->u.u.type==KeyPress)||(xE->u.u.type==KeyRelease))) {
|
|
||||||
ErrorF("FixKeyState: Key %d %s\n",key,
|
ErrorF("FixKeyState: Key %d %s\n",key,
|
||||||
(xE->u.u.type==KeyPress?"down":"up"));
|
(xE->u.u.type==KeyPress?"down":"up"));
|
||||||
}
|
}
|
||||||
|
@ -4753,9 +4747,6 @@ int GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
|
||||||
}
|
}
|
||||||
first_valuator += 6;
|
first_valuator += 6;
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
|
||||||
ErrorF("GKVE: DV event with %d valuators\n", xv->num_valuators);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pDev->coreEvents) {
|
if (pDev->coreEvents) {
|
||||||
|
@ -4793,10 +4784,6 @@ int GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
ErrorF("GKVE: putting out %d events with detail %d\n", numEvents, key_code);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return numEvents;
|
return numEvents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4882,12 +4869,6 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
|
||||||
if (!pDev->button || (pDev->coreEvents && !(cp->button || !cp->valuator)))
|
if (!pDev->button || (pDev->coreEvents && !(cp->button || !cp->valuator)))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
ErrorF("GPE: called with device %d, type %d\n", pDev->id, type);
|
|
||||||
ErrorF("GPE: relative %s, accelerate %s\n", flags & POINTER_RELATIVE ? "yes" : "no",
|
|
||||||
flags & POINTER_ACCELERATE ? "yes" : "no");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (pDev->coreEvents)
|
if (pDev->coreEvents)
|
||||||
numEvents = 2;
|
numEvents = 2;
|
||||||
else
|
else
|
||||||
|
@ -4967,15 +4948,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
|
||||||
kbp->root_y = axes->max_value;
|
kbp->root_y = axes->max_value;
|
||||||
|
|
||||||
if (pDev->coreEvents) {
|
if (pDev->coreEvents) {
|
||||||
#ifdef DEBUG
|
|
||||||
ErrorF("warping core lastx from %d to %d\n", cp->valuator->lastx, kbp->root_x);
|
|
||||||
ErrorF("x value given was %d\n", valuators[0]);
|
|
||||||
#endif
|
|
||||||
cp->valuator->lastx = kbp->root_x;
|
cp->valuator->lastx = kbp->root_x;
|
||||||
#ifdef DEBUG
|
|
||||||
ErrorF("warping core lasty from %d to %d\n", cp->valuator->lasty, kbp->root_y);
|
|
||||||
ErrorF("y value given was %d\n", valuators[1]);
|
|
||||||
#endif
|
|
||||||
cp->valuator->lasty = kbp->root_y;
|
cp->valuator->lasty = kbp->root_y;
|
||||||
}
|
}
|
||||||
pDev->valuator->lastx = kbp->root_x;
|
pDev->valuator->lastx = kbp->root_x;
|
||||||
|
@ -4983,18 +4956,12 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
|
||||||
|
|
||||||
if (type == MotionNotify) {
|
if (type == MotionNotify) {
|
||||||
kbp->type = DeviceMotionNotify;
|
kbp->type = DeviceMotionNotify;
|
||||||
#ifdef DEBUG
|
|
||||||
ErrorF("GPE: motion at %d, %d\n", kbp->root_x, kbp->root_y);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (type == ButtonPress)
|
if (type == ButtonPress)
|
||||||
kbp->type = DeviceButtonPress;
|
kbp->type = DeviceButtonPress;
|
||||||
else if (type == ButtonRelease)
|
else if (type == ButtonRelease)
|
||||||
kbp->type = DeviceButtonRelease;
|
kbp->type = DeviceButtonRelease;
|
||||||
#ifdef DEBUG
|
|
||||||
ErrorF("GPE: detail is %d\n", buttons);
|
|
||||||
#endif
|
|
||||||
kbp->detail = pDev->button->map[buttons];
|
kbp->detail = pDev->button->map[buttons];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5028,29 +4995,17 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
|
||||||
}
|
}
|
||||||
first_valuator += 6;
|
first_valuator += 6;
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
|
||||||
ErrorF("GPE: DV event with %d valuators\n", xv->num_valuators);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pDev->coreEvents) {
|
if (pDev->coreEvents) {
|
||||||
events++;
|
events++;
|
||||||
events->u.u.type = type;
|
events->u.u.type = type;
|
||||||
#ifdef DEBUG
|
|
||||||
ErrorF("GPE: core type is %d\n", type);
|
|
||||||
#endif
|
|
||||||
events->u.keyButtonPointer.time = ms;
|
events->u.keyButtonPointer.time = ms;
|
||||||
events->u.keyButtonPointer.rootX = kbp->root_x;
|
events->u.keyButtonPointer.rootX = kbp->root_x;
|
||||||
events->u.keyButtonPointer.rootY = kbp->root_y;
|
events->u.keyButtonPointer.rootY = kbp->root_y;
|
||||||
cp->valuator->lastx = kbp->root_x;
|
cp->valuator->lastx = kbp->root_x;
|
||||||
cp->valuator->lasty = kbp->root_y;
|
cp->valuator->lasty = kbp->root_y;
|
||||||
#ifdef DEBUG
|
|
||||||
ErrorF("GPE: core co-ords at %d, %d\n", kbp->root_x, kbp->root_y);
|
|
||||||
#endif
|
|
||||||
if (type == ButtonPress || type == ButtonRelease) {
|
if (type == ButtonPress || type == ButtonRelease) {
|
||||||
#ifdef DEBUG
|
|
||||||
ErrorF("GPE: core detail is %d\n", buttons);
|
|
||||||
#endif
|
|
||||||
/* Core buttons remapping shouldn't be transitive. */
|
/* Core buttons remapping shouldn't be transitive. */
|
||||||
events->u.u.detail = pDev->button->map[buttons];
|
events->u.u.detail = pDev->button->map[buttons];
|
||||||
}
|
}
|
||||||
|
|
13
mi/mieq.c
13
mi/mieq.c
|
@ -103,11 +103,6 @@ mieqEnqueue (xEvent *e)
|
||||||
deviceKeyButtonPointer *lastkbp = (deviceKeyButtonPointer *)
|
deviceKeyButtonPointer *lastkbp = (deviceKeyButtonPointer *)
|
||||||
&laste->event[0];
|
&laste->event[0];
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
ErrorF("mieqEnqueue: slamming an event on to the queue from %d\n", kbp->deviceid & DEVICE_BITS);
|
|
||||||
ErrorF(" type %d, detail %d\n", e->u.u.type, e->u.u.detail);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (e->u.u.type == MotionNotify) {
|
if (e->u.u.type == MotionNotify) {
|
||||||
miPointerAbsoluteCursor(e->u.keyButtonPointer.rootX,
|
miPointerAbsoluteCursor(e->u.keyButtonPointer.rootX,
|
||||||
e->u.keyButtonPointer.rootY,
|
e->u.keyButtonPointer.rootY,
|
||||||
|
@ -178,15 +173,9 @@ mieqEnqueue (xEvent *e)
|
||||||
*/
|
*/
|
||||||
if (e->u.keyButtonPointer.time < miEventQueue.lastEventTime &&
|
if (e->u.keyButtonPointer.time < miEventQueue.lastEventTime &&
|
||||||
miEventQueue.lastEventTime - e->u.keyButtonPointer.time < 10000)
|
miEventQueue.lastEventTime - e->u.keyButtonPointer.time < 10000)
|
||||||
{
|
|
||||||
#ifdef DEBUG
|
|
||||||
ErrorF("mieq: rewinding event time from %d to %d\n",
|
|
||||||
miEventQueue.lastEventTime,
|
|
||||||
miEventQueue.events[oldtail].event[0].u.keyButtonPointer.time);
|
|
||||||
#endif
|
|
||||||
miEventQueue.events[oldtail].event[0].u.keyButtonPointer.time =
|
miEventQueue.events[oldtail].event[0].u.keyButtonPointer.time =
|
||||||
miEventQueue.lastEventTime;
|
miEventQueue.lastEventTime;
|
||||||
}
|
|
||||||
miEventQueue.lastEventTime =
|
miEventQueue.lastEventTime =
|
||||||
miEventQueue.events[oldtail].event[0].u.keyButtonPointer.time;
|
miEventQueue.events[oldtail].event[0].u.keyButtonPointer.time;
|
||||||
miEventQueue.events[oldtail].pScreen = miEventQueue.pEnqueueScreen;
|
miEventQueue.events[oldtail].pScreen = miEventQueue.pEnqueueScreen;
|
||||||
|
|
Loading…
Reference in New Issue