[PATCH] dix: Replace DEBUG_EVENTS + ErrorF with DebugF

Peter Hutterer peter.hutterer at who-t.net
Thu Apr 14 00:36:11 PDT 2011


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 dix/events.c |   42 +++++++++++-------------------------------
 1 files changed, 11 insertions(+), 31 deletions(-)

diff --git a/dix/events.c b/dix/events.c
index 8835c5e..779368d 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -1827,33 +1827,25 @@ TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents,
 {
     int type;
 
-#ifdef DEBUG_EVENTS
-    ErrorF("[dix] Event([%d, %d], mask=0x%lx), client=%d%s",
+    DebugF("[dix] Event([%d, %d], mask=0x%lx), client=%d%s",
            pEvents->u.u.type, pEvents->u.u.detail, mask,
            client ? client->index : -1,
            (client && client->clientGone) ? " (gone)" : "");
-#endif
 
     if (!client || client == serverClient || client->clientGone) {
-#ifdef DEBUG_EVENTS
-        ErrorF(" not delivered to fake/dead client\n");
-#endif
+        DebugF(" not delivered to fake/dead client\n");
         return 0;
     }
 
     if (filter != CantBeFiltered && !(mask & filter))
     {
- #ifdef DEBUG_EVENTS
-        ErrorF(" filtered\n");
- #endif
+        DebugF(" filtered\n");
         return 0;
     }
 
     if (grab && !SameClient(grab, client))
     {
-#ifdef DEBUG_EVENTS
-        ErrorF(" not delivered due to grab\n");
-#endif
+        DebugF(" not delivered due to grab\n");
         return -1; /* don't send, but notify caller */
     }
 
@@ -1865,10 +1857,8 @@ TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents,
             if (WID(dev->valuator->motionHintWindow) ==
                     pEvents->u.keyButtonPointer.event)
             {
-#ifdef DEBUG_EVENTS
-                ErrorF("[dix] \n");
-                ErrorF("[dix] motionHintWindow == keyButtonPointer.event\n");
-#endif
+                DebugF("[dix] \n");
+                DebugF("[dix] motionHintWindow == keyButtonPointer.event\n");
                 return 1; /* don't send, but pretend we did */
             }
             pEvents->u.u.detail = NotifyHint;
@@ -1892,14 +1882,10 @@ TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents,
                 xEvent release = *pEvents;
                 release.u.u.type = KeyRelease;
                 WriteEventsToClient(client, 1, &release);
-#ifdef DEBUG_EVENTS
-                ErrorF(" (plus fake core release for repeat)");
-#endif
+                DebugF(" (plus fake core release for repeat)");
             } else
             {
-#ifdef DEBUG_EVENTS
-                ErrorF(" (detectable autorepeat for core)");
-#endif
+                DebugF(" (detectable autorepeat for core)");
             }
         }
 
@@ -1911,15 +1897,11 @@ TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents,
             {
                 deviceKeyButtonPointer release = *(deviceKeyButtonPointer *)pEvents;
                 release.type = DeviceKeyRelease;
-#ifdef DEBUG_EVENTS
-                ErrorF(" (plus fake xi1 release for repeat)");
-#endif
+                DebugF(" (plus fake xi1 release for repeat)");
                 WriteEventsToClient(client, 1, (xEvent *) &release);
             }
             else {
-#ifdef DEBUG_EVENTS
-                ErrorF(" (detectable autorepeat for core)");
-#endif
+                DebugF(" (detectable autorepeat for core)");
             }
         }
     }
@@ -1932,9 +1914,7 @@ TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents,
     }
 
     WriteEventsToClient(client, count, pEvents);
-#ifdef DEBUG_EVENTS
-    ErrorF("[dix]  delivered\n");
-#endif
+    DebugF("[dix]  delivered\n");
     return 1;
 }
 
-- 
1.7.4.2


More information about the xorg-devel mailing list