Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-04-23 11:38:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-04-23 11:44:17 +0300
commita3d67456cd44b7095217a54136ed67276c2eb0d1 (patch)
tree50c6c53109345c8c1c74b6ceff8314d8ac4c452e
parentab3c1de56d279bf3c97203e21875cf9a9086842f (diff)
GHOST/X11: print description of error event
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 3e1dbd18119..0c87ee17cb0 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -1925,10 +1925,19 @@ GHOST_TSuccess GHOST_SystemX11::pushDragDropEvent(GHOST_TEventType eventType,
* Basically it will not crash blender now if you have a X device that
* is configured but not plugged in.
*/
-int GHOST_X11_ApplicationErrorHandler(Display * /*display*/, XErrorEvent *theEvent)
+int GHOST_X11_ApplicationErrorHandler(Display *display, XErrorEvent *event)
{
- fprintf(stderr, "Ignoring Xlib error: error code %d request code %d\n",
- theEvent->error_code, theEvent->request_code);
+ char error_code_str[512];
+
+ XGetErrorText(display, event->error_code, error_code_str, sizeof(error_code_str));
+
+ fprintf(stderr,
+ "Received X11 Error:\n"
+ "\terror code: %d\n"
+ "\trequest code: %d\n"
+ "\tminor code: %d\n"
+ "\terror text: %s\n",
+ event->error_code, event->request_code, event->minor_code, error_code_str);
/* No exit! - but keep lint happy */
return 0;