print X11 errors v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Fri, 02 Apr 2021 17:44:01 +0200
branchv_0
changeset 5 7afa994c98f0
parent 4 820c4a4a3ed8
child 6 1b17b8cdbfc3
print X11 errors
src/X11Command.h
--- a/src/X11Command.h	Fri Apr 02 10:54:46 2021 +0200
+++ b/src/X11Command.h	Fri Apr 02 17:44:01 2021 +0200
@@ -263,7 +263,15 @@
 	}
 
 	static int handleXError(::Display* display, XErrorEvent* errorEvent) {
-		// FIXME: print error
+		std::wcerr << L"X11 error:"
+				<< L" display=" << errorEvent->display
+				<< L" error_code=" << errorEvent->error_code
+				<< L" minor_code=" << errorEvent->minor_code
+				<< L" request_code=" << errorEvent->request_code
+				<< L" resourceid=" << errorEvent->resourceid
+				<< L" serial=" << errorEvent->serial
+				<< L" type=" << errorEvent->type
+				<< std::endl;
 		return 0;
 	}