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 /include | |
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 'include')
-rw-r--r-- | include/eventstr.h | 4 | ||||
-rw-r--r-- | include/inpututils.h | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/include/eventstr.h b/include/eventstr.h index 673207ce3..049688ca0 100644 --- a/include/eventstr.h +++ b/include/eventstr.h @@ -68,10 +68,6 @@ enum EventType { ET_Internal = 0xFF /* First byte */ }; -#define CHECKEVENT(ev) if (ev && ((InternalEvent*)(ev))->any.header != 0xFF) \ - FatalError("Wrong event type %d.\n", \ - ((InternalEvent*)(ev))->any.header); - /** * Used for ALL input device events internal in the server until * copied into the matching protocol event. diff --git a/include/inpututils.h b/include/inpututils.h index b8ca6abfc..92a754327 100644 --- a/include/inpututils.h +++ b/include/inpututils.h @@ -37,4 +37,6 @@ struct _ValuatorMask { int valuators[MAX_VALUATORS]; /* valuator data */ }; +extern void verify_internal_event(const InternalEvent *ev); + #endif |