summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-10-05 19:46:41 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-10-05 19:46:41 +0100
commit15ef4a3248bbf32d05da7ed2480a2ce58c26d9bc (patch)
treeb25009c274f6265aa7192fcf97b13f795e9c97c3
parentb1532f465e05d566f6d160c5ca916a5a12614067 (diff)
downloadcairo-15ef4a3248bbf32d05da7ed2480a2ce58c26d9bc.tar.gz
xlib/shm: Note the bug is an interaction between libXext and xorg
Søren thought it was bit harsh to lay the blame solely on xorg for it crashing due to an unexpected input value, and that we should mention libXext was also partly to blame for incorrectly setting the SEND_EVENT bit in the ShmCompletionEvent. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/cairo-xlib-surface-shm.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/cairo-xlib-surface-shm.c b/src/cairo-xlib-surface-shm.c
index 3e6eaf276..ec8a6e1dd 100644
--- a/src/cairo-xlib-surface-shm.c
+++ b/src/cairo-xlib-surface-shm.c
@@ -1125,9 +1125,12 @@ _cairo_xlib_shm_surface_is_idle (cairo_surface_t *surface)
(((major) * 10000000) + ((minor) * 100000) + ((patch) * 1000) + snap)
static cairo_bool_t
-xorg_has_buggy_send_event(Display *dpy)
+xorg_has_buggy_send_shm_completion_event(Display *dpy)
{
- /* Avoid incurring the wrath fixed by:
+ /* As libXext sets the SEND_EVENT bit in the ShmCompletionEvent,
+ * the Xserver may crash if it does not take care when processing
+ * the event type. For instance versions of Xorg prior to 1.11.1
+ * exhibited this bug, and was fixed by:
*
* commit 2d2dce558d24eeea0eb011ec9ebaa6c5c2273c39
* Author: Sam Spilsbury <sam.spilsbury@canonical.com>
@@ -1171,7 +1174,7 @@ _cairo_xlib_display_init_shm (cairo_xlib_display_t *display)
DefaultVisual (display->display, scr),
CWOverrideRedirect, &attr);
- if (xorg_has_buggy_send_event(display->display))
+ if (xorg_has_buggy_send_shm_completion_event(display->display))
has_pixmap = 0;
shm->has_pixmaps = has_pixmap ? MIN_PIXMAP_SIZE : 0;