mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-07 00:50:19 +01:00
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@redhat.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
bf41cc397f
commit
98d01cd119
1 changed files with 4 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
@ -1200,7 +1200,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
|
||||
|
|
@ -1242,7 +1242,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue