From 825a3d837a33f226c879cd02ad15c3fba57e8b2c Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 23 Jan 2012 23:30:42 +1000 Subject: Update the EFL to what I'm actually using, coz I'm using some stuff not yet released. --- libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_error.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_error.c') diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_error.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_error.c index bbd9c2a..fc32926 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_error.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_error.c @@ -8,6 +8,7 @@ static void (*_io_error_func)(void *data) = NULL; static void *_io_error_data = NULL; static int _error_request_code = 0; static int _error_code = 0; +static Ecore_X_ID _error_resource_id = 0; /** * Set the error handler. @@ -63,6 +64,18 @@ ecore_x_error_code_get(void) return _error_code; } +/** + * Get the resource id that caused the error. + * @return The resource id causing the X error + * + * Return the X resource id that caused the last X error + */ +EAPI Ecore_X_ID +ecore_x_error_resource_id_get(void) +{ + return _error_resource_id; +} + int _ecore_xcb_error_handle(xcb_generic_error_t *err) { @@ -84,6 +97,7 @@ _ecore_xcb_error_handle(xcb_generic_error_t *err) _error_request_code = err->sequence; _error_code = err->error_code; + _error_resource_id = err->resource_id; if (_error_func) _error_func(_error_data); -- cgit v1.1