diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-05-05 08:48:19 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-05-06 09:58:08 +1000 |
commit | 56901998020b6f443cbaa5eb303100d979e81b22 (patch) | |
tree | 2dea93e2d0c1d30b1d898092e5a51be17da1683d /mi | |
parent | bf2059b07a97e5e579c13c2c9d49707093427dc2 (diff) |
input: change CHECKEVENT macro to verify_internal_event function
The macro is sufficient if called during a development cycle, but not
sufficient information when triggered by a user (e.g.
https://bugzilla.redhat.com/show_bug.cgi?id=688693).
Expand what this does to print the event content and a backtrace, so at
least we know where we're coming from. Only the first 32 bytes are printed
since if something goes wrong, the event we have is almost certainly an
xEvent or xError, both restricted to 32 bytes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'mi')
-rw-r--r-- | mi/mieq.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -156,7 +156,7 @@ mieqEnqueue(DeviceIntPtr pDev, InternalEvent *e) pthread_mutex_lock(&miEventQueueMutex); #endif - CHECKEVENT(e); + verify_internal_event(e); /* avoid merging events from different devices */ if (e->any.type == ET_Motion) @@ -292,8 +292,8 @@ static void FixUpEventForMaster(DeviceIntPtr mdev, DeviceIntPtr sdev, InternalEvent* original, InternalEvent *master) { - CHECKEVENT(original); - CHECKEVENT(master); + verify_internal_event(original); + verify_internal_event(master); /* Ensure chained button mappings, i.e. that the detail field is the * value of the mapped button on the SD, not the physical button */ if (original->any.type == ET_ButtonPress || @@ -323,7 +323,7 @@ CopyGetMasterEvent(DeviceIntPtr sdev, int type = original->any.type; int mtype; /* which master type? */ - CHECKEVENT(original); + verify_internal_event(original); /* ET_XQuartz has sdev == NULL */ if (!sdev || IsMaster(sdev) || IsFloating(sdev)) @@ -376,7 +376,7 @@ mieqProcessDeviceEvent(DeviceIntPtr dev, DeviceIntPtr master; InternalEvent mevent; /* master event */ - CHECKEVENT(event); + verify_internal_event(event); /* Custom event handler */ handler = miEventQueue.handlers[event->any.type]; |