[cairo-commit] Branch '1.14' - src/cairo-xlib-surface-shm.c
Uli Schlachter
psychon at kemper.freedesktop.org
Sun Nov 27 16:16:53 UTC 2016
src/cairo-xlib-surface-shm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 42a743cfcb5344f804a2d3be885bdc63f72df5dd
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date: Fri Nov 6 18:13:05 2015 +0100
xlib: fix mixing xcb & xlib calls
NextRequest is a macro that doesn't mix well with xcb, since
dpy->request is not updated. Instead use XNextRequest() that was fixed
to do the right thing with xcb in libX11 commit:
http://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=7f8f9a36ef901f31279c385caf960a22daeb33fe
This may solve application X errors when a shmdt() is called by cairo
before the Attach request is processed.
Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/src/cairo-xlib-surface-shm.c b/src/cairo-xlib-surface-shm.c
index fb40699..9824eff 100644
--- a/src/cairo-xlib-surface-shm.c
+++ b/src/cairo-xlib-surface-shm.c
@@ -441,7 +441,7 @@ static void send_event(cairo_xlib_display_t *display,
ev.type = display->shm->event;
ev.send_event = 1; /* XXX or lie? */
- ev.serial = NextRequest (display->display);
+ ev.serial = XNextRequest (display->display);
ev.drawable = display->shm->window;
ev.major_code = display->shm->opcode;
ev.minor_code = X_ShmPutImage;
@@ -599,7 +599,7 @@ _cairo_xlib_shm_pool_create(cairo_xlib_display_t *display,
goto cleanup;
}
- pool->attached = NextRequest (dpy);
+ pool->attached = XNextRequest (dpy);
success = XShmAttach (dpy, &pool->shm);
#if !IPC_RMID_DEFERRED_RELEASE
XSync (dpy, FALSE);
@@ -1199,7 +1199,7 @@ _cairo_xlib_shm_surface_mark_active (cairo_surface_t *_shm)
cairo_xlib_shm_surface_t *shm = (cairo_xlib_shm_surface_t *) _shm;
cairo_xlib_display_t *display = (cairo_xlib_display_t *) _shm->device;
- shm->active = NextRequest (display->display);
+ shm->active = XNextRequest (display->display);
}
void
@@ -1241,7 +1241,7 @@ _cairo_xlib_shm_surface_get_obdata (cairo_surface_t *surface)
cairo_xlib_display_t *display = (cairo_xlib_display_t *) surface->device;
cairo_xlib_shm_surface_t *shm = (cairo_xlib_shm_surface_t *) surface;
- display->shm->last_event = shm->active = NextRequest (display->display);
+ display->shm->last_event = shm->active = XNextRequest (display->display);
return &shm->info->pool->shm;
}
More information about the cairo-commit
mailing list