summaryrefslogtreecommitdiff
path: root/xkb/xkbEvents.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2008-02-03 23:30:22 +1100
committerDaniel Stone <daniel@fooishbar.org>2008-02-17 22:52:07 +0200
commit534fc5140b039a8c98ab715d0a6740d513b41209 (patch)
tree69b0b6a9ac233f59c70627a79ca55eefefb37635 /xkb/xkbEvents.c
parent0f12a448dcbbbf1f40aa98d09c9d25ee511c5bbf (diff)
downloadxserver-534fc5140b039a8c98ab715d0a6740d513b41209.tar.gz
XKB: Remove a bunch of mad ifdefs
We have SEEK_SET and size_t, seriously. Also use DebugF instead of ifdef DEBUG, and ditch a couple of random bits that were never used.
Diffstat (limited to 'xkb/xkbEvents.c')
-rw-r--r--xkb/xkbEvents.c34
1 files changed, 12 insertions, 22 deletions
diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c
index 7643703e4..49725d065 100644
--- a/xkb/xkbEvents.c
+++ b/xkb/xkbEvents.c
@@ -813,23 +813,21 @@ XkbSrvInfoPtr xkbi;
xkbi= pXDev->key->xkbInfo;
if ( pClient->xkbClientFlags & _XkbClientInitialized ) {
-#ifdef DEBUG
if ((xkbDebugFlags&0x10)&&
((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease)||
(xE[0].u.u.type==DeviceKeyPress)||
(xE[0].u.u.type == DeviceKeyRelease))) {
- ErrorF("XKbFilterWriteEvents:\n");
- ErrorF(" Event state= 0x%04x\n",xE[0].u.keyButtonPointer.state);
- ErrorF(" XkbLastRepeatEvent!=xE (0x%p!=0x%p) %s\n",
+ DebugF("XKbFilterWriteEvents:\n");
+ DebugF(" Event state= 0x%04x\n",xE[0].u.keyButtonPointer.state);
+ DebugF(" XkbLastRepeatEvent!=xE (0x%p!=0x%p) %s\n",
XkbLastRepeatEvent,xE,
((XkbLastRepeatEvent!=(pointer)xE)?"True":"False"));
- ErrorF(" (xkbClientEventsFlags&XWDA)==0 (0x%x) %s\n",
+ DebugF(" (xkbClientEventsFlags&XWDA)==0 (0x%x) %s\n",
pClient->xkbClientFlags,
(_XkbWantsDetectableAutoRepeat(pClient)?"True":"False"));
- ErrorF(" !IsRelease(%d) %s\n",xE[0].u.u.type,
+ DebugF(" !IsRelease(%d) %s\n",xE[0].u.u.type,
(!_XkbIsReleaseEvent(xE[0].u.u.type))?"True":"False");
}
-#endif /* DEBUG */
if ( (XkbLastRepeatEvent==(pointer)xE) &&
(_XkbWantsDetectableAutoRepeat(pClient)) &&
(_XkbIsReleaseEvent(xE[0].u.u.type)) ) {
@@ -866,13 +864,11 @@ XkbSrvInfoPtr xkbi;
if (xE[0].u.u.type == ButtonPress &&
((xE[0].u.keyButtonPointer.state >> 7) & button_mask) == button_mask &&
(xkbi->lockedPtrButtons & button_mask) == button_mask) {
-#ifdef DEBUG
/* If the MouseKeys is pressed, and the "real" mouse is also pressed
* when the mouse is released, the server does not behave properly.
* Faking a release of the button here solves the problem.
*/
- ErrorF("Faking release of button %d\n", xE[0].u.u.detail);
-#endif
+ DebugF("Faking release of button %d\n", xE[0].u.u.detail);
XkbDDXFakePointerButton(ButtonRelease, xE[0].u.u.detail);
}
}
@@ -881,21 +877,19 @@ XkbSrvInfoPtr xkbi;
for (i=0;i<nEvents;i++) {
type= xE[i].u.u.type;
-#ifdef DEBUG
if ((xkbDebugFlags&0x4)&&
((xE[i].u.u.type==KeyPress)||(xE[i].u.u.type==KeyRelease)||
(xE[i].u.u.type==DeviceKeyPress)||
(xE[i].u.u.type == DeviceKeyRelease))) {
XkbStatePtr s= &xkbi->state;
- ErrorF("XKbFilterWriteEvents (non-XKB):\n");
- ErrorF("event= 0x%04x\n",xE[i].u.keyButtonPointer.state);
- ErrorF("lookup= 0x%02x, grab= 0x%02x\n",s->lookup_mods,
+ DebugF("XKbFilterWriteEvents (non-XKB):\n");
+ DebugF("event= 0x%04x\n",xE[i].u.keyButtonPointer.state);
+ DebugF("lookup= 0x%02x, grab= 0x%02x\n",s->lookup_mods,
s->grab_mods);
- ErrorF("compat lookup= 0x%02x, grab= 0x%02x\n",
+ DebugF("compat lookup= 0x%02x, grab= 0x%02x\n",
s->compat_lookup_mods,
s->compat_grab_mods);
}
-#endif
if ( (type>=KeyPress)&&(type<=MotionNotify) ) {
CARD16 old,new;
@@ -924,16 +918,12 @@ XkbSrvInfoPtr xkbi;
if (type == ButtonPress &&
((xE[i].u.keyButtonPointer.state >> 7) & button_mask) == button_mask &&
(xkbi->lockedPtrButtons & button_mask) == button_mask) {
-#ifdef DEBUG
- ErrorF("Faking release of button %d\n", xE[i].u.u.detail);
-#endif
+ DebugF("Faking release of button %d\n", xE[i].u.u.detail);
XkbDDXFakePointerButton(ButtonRelease, xE[i].u.u.detail);
} else if (type == DeviceButtonPress &&
((((deviceKeyButtonPointer*)&xE[i])->state >> 7) & button_mask) == button_mask &&
(xkbi->lockedPtrButtons & button_mask) == button_mask) {
-#ifdef DEBUG
- ErrorF("Faking release of button %d\n", ((deviceKeyButtonPointer*)&xE[i])->state);
-#endif
+ DebugF("Faking release of button %d\n", ((deviceKeyButtonPointer*)&xE[i])->state);
XkbDDXFakePointerButton(DeviceButtonRelease, ((deviceKeyButtonPointer*)&xE[i])->state);
}
}