From eebb0df512da50f883a417bb5e8e368dc81e35a9 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Wed, 27 Jun 2007 11:08:53 -0700 Subject: Revert "[cairo-xlib-display] Hide XErrors during processing of the work queue." This reverts commit 285b702ef6f73e7eb4ca0da235a287ad1e1f412f. The recent commit of 0791f342b93225849d9171aac8b738014b18bdf5 fixes the same bug that 285b702e was fixing, but without introducing any performance-killing calls to XSync. So we can drop those now. --- src/cairo-xlib-display.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/cairo-xlib-display.c b/src/cairo-xlib-display.c index 3ff633e3..5de90111 100644 --- a/src/cairo-xlib-display.c +++ b/src/cairo-xlib-display.c @@ -405,13 +405,10 @@ void _cairo_xlib_display_notify (cairo_xlib_display_t *display) { cairo_xlib_job_t *jobs, *job, *freelist; - Display *dpy = display->display; CAIRO_MUTEX_LOCK (display->mutex); jobs = display->workqueue; while (jobs != NULL) { - cairo_xlib_error_func_t old_handler; - display->workqueue = NULL; CAIRO_MUTEX_UNLOCK (display->mutex); @@ -425,32 +422,24 @@ _cairo_xlib_display_notify (cairo_xlib_display_t *display) } while (jobs != NULL); freelist = jobs = job; - /* protect the notifies from triggering XErrors - * XXX There is a remote possibility that the application has - * been reallocated an XID that we are about to destroy here... */ - XSync (dpy, False); - old_handler = XSetErrorHandler (_noop_error_handler); - do { job = jobs; jobs = job->next; switch (job->type){ case WORK: - job->func.work.notify (dpy, job->func.work.data); + job->func.work.notify (display->display, job->func.work.data); if (job->func.work.destroy != NULL) job->func.work.destroy (job->func.work.data); break; case RESOURCE: - job->func.resource.notify (dpy, job->func.resource.xid); + job->func.resource.notify (display->display, + job->func.resource.xid); break; } } while (jobs != NULL); - XSync (dpy, False); - XSetErrorHandler (old_handler); - CAIRO_MUTEX_LOCK (display->mutex); do { job = freelist; -- cgit v1.2.3