diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-06-21 10:41:36 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2019-06-22 11:30:54 +0200 |
commit | 4962c5a8dee7bc2b903b9aafa27f4d0fd3c1d177 (patch) | |
tree | 4947d6dbb0a62f8a4802c4aaa4712db7ec6577dd /nx-X11/programs/Xserver/xkb/xkbEvents.c | |
parent | 56dcc8a4b6a9ed3b7f55e0eeaeff9bc14737cdd5 (diff) | |
download | nx-libs-4962c5a8dee7bc2b903b9aafa27f4d0fd3c1d177.tar.gz nx-libs-4962c5a8dee7bc2b903b9aafa27f4d0fd3c1d177.tar.bz2 nx-libs-4962c5a8dee7bc2b903b9aafa27f4d0fd3c1d177.zip |
XKB: Remove a bunch of mad ifdefs
commit 534fc5140b039a8c98ab715d0a6740d513b41209
Author: Daniel Stone <daniel@fooishbar.org>
Date: Sun Feb 3 23:30:22 2008 +1100
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 'nx-X11/programs/Xserver/xkb/xkbEvents.c')
-rw-r--r-- | nx-X11/programs/Xserver/xkb/xkbEvents.c | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/nx-X11/programs/Xserver/xkb/xkbEvents.c b/nx-X11/programs/Xserver/xkb/xkbEvents.c index c7a0f9e87..6e8df3490 100644 --- a/nx-X11/programs/Xserver/xkb/xkbEvents.c +++ b/nx-X11/programs/Xserver/xkb/xkbEvents.c @@ -804,21 +804,19 @@ 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))) { - ErrorF("XKbFilterWriteEvents:\n"); - ErrorF(" Event state= 0x%04x\n",xE[0].u.keyButtonPointer.state); - ErrorF(" XkbLastRepeatEvent!=xE (0x%x!=0x%x) %s\n", + DebugF("XKbFilterWriteEvents:\n"); + DebugF(" Event state= 0x%04x\n",xE[0].u.keyButtonPointer.state); + DebugF(" XkbLastRepeatEvent!=xE (0x%x!=0x%x) %s\n", XkbLastRepeatEvent,xE, ((XkbLastRepeatEvent!=(void *)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==(void *)xE) && (_XkbWantsDetectableAutoRepeat(pClient)) && (_XkbIsReleaseEvent(xE[0].u.u.type)) ) { @@ -853,13 +851,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); } } @@ -868,19 +864,17 @@ XkbSrvInfoPtr xkbi; for (i=0;i<nEvents;i++) { type= xE[i].u.u.type; -#ifdef DEBUG if ((xkbDebugFlags&0x4)&& ((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease))) { XkbStatePtr s= &xkbi->state; - ErrorF("XKbFilterWriteEvents (non-XKB):\n"); - ErrorF("event= 0x%04x\n",xE[0].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[0].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; @@ -900,9 +894,7 @@ 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); } } |