Exemple #1
0
		int HandleError (IntPtr display, ref XErrorEvent error_event)
		{
			// we need to workaround a problem with the
			// ordering of destruction of Drawables and
			// Pictures that exists between cairo and
			// RENDER on the server.
			if (error_event.request_code == (XRequest)render_major_opcode
			    && error_event.minor_code == 7 /* X_RenderFreePicture from render.h */
			    && error_event.error_code == render_first_error + 1 /* BadPicture from render.h */) {
				return 0;
			}

			if (ErrorExceptions) {
				XUngrabPointer (display, IntPtr.Zero);
				throw new XException (error_event.display, error_event.resourceid,
						      error_event.serial, error_event.error_code,
						      error_event.request_code, error_event.minor_code);
			} else {
				Console.WriteLine("X11 Error encountered: {0}{1}\n",
						  XException.GetMessage (error_event.display, error_event.resourceid,
									 error_event.serial, error_event.error_code,
									 error_event.request_code, error_event.minor_code),
						  Environment.StackTrace);
			}
			return 0;
		}
Exemple #2
0
 static int HandleError(IntPtr display, ref XErrorEvent error_event)
 {
     return 0;
 }
Exemple #3
0
		private int HandleError (IntPtr display, ref XErrorEvent error_event)
		{
			if (ErrorExceptions)
				throw new X11Exception (error_event.display, error_event.resourceid,
							error_event.serial, error_event.error_code,
							error_event.request_code, error_event.minor_code);
			else
				Console.WriteLine ("X11 Error encountered: {0}{1}\n",
						   X11Exception.GetMessage(error_event.display, error_event.resourceid,
									   error_event.serial, error_event.error_code,
									   error_event.request_code, error_event.minor_code),
						   WhereString());
			return 0;
		}
Exemple #4
0
		private int HandleError (IntPtr display, ref XErrorEvent error_event)
		{
			if (ErrorExceptions) {
				throw new XException (error_event.display, error_event.resourceid, error_event.serial, error_event.error_code, error_event.request_code, error_event.minor_code);
			} else {
				Console.WriteLine ("X11 Error encountered: {0}{1}\n", XException.GetMessage (error_event.display, error_event.resourceid, error_event.serial, error_event.error_code, error_event.request_code, error_event.minor_code), Environment.StackTrace);
			}
			return 0;
		}