From 84b66849fc005365e71a40517c192e0cd178a82b Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 2 Sep 2013 22:55:17 +0100 Subject: [PATCH] intel-virtual-output: Don't set the SHM active flag along !SHM composite paths Otherwise we may end up waiting for an event that will never be sent. Signed-off-by: Chris Wilson --- tools/virtual.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/virtual.c b/tools/virtual.c index 7655a7b0..14386696 100644 --- a/tools/virtual.c +++ b/tools/virtual.c @@ -237,7 +237,9 @@ can_use_shm(Display *dpy, * * Remove the SendEvent bit (0x80) before doing range checks on event type. */ - codes = XInitExtension(dpy, SHMNAME); + codes = 0; + if (has_shm) + codes = XInitExtension(dpy, SHMNAME); if (xlib_vendor_is_xorg(dpy) && VendorRelease(dpy) < XORG_VERSION_ENCODE(1,11,0,1)) codes = 0; @@ -1233,7 +1235,8 @@ static void put_dst(struct clone *c, const XRectangle *clip) 0, 0, clip->width, clip->height); } - c->dst.serial = NextRequest(c->dst.dpy); + if (c->dst.use_shm) + c->dst.serial = NextRequest(c->dst.dpy); XRenderComposite(c->dst.dpy, PictOpSrc, c->dst.pix_picture, 0, c->dst.win_picture, 0, 0,