winex11 - Fix X11DRV_DIB_GetImageBits() when target bitmaps are
larger than fetched area
Alexandre Julliard
julliard at winehq.org
Tue Jun 19 05:42:49 CDT 2007
Peter Dons Tychsen <donpedro at tdcadsl.dk> writes:
> #ifdef HAVE_LIBXXSHM
> - if (descr->image && descr->useShm)
> +
> + if(descr->image && descr->useShm)
> + {
> + XGetGeometry(gdi_display, descr->drawable, &root, &x, &y, &width,
> &height, &border_width, &depth);
> + TRACE("XGetGeometry(), width=%i, heigth=%i\n", width, height);
> + }
> +
> + /* We must not call XShmGetImage() with a bitmap which is bigger
> than the avilable area.
> + If we do, XShmGetImage() will fail (X exception), as it checks
> for this internally. */
> + if((descr->image && descr->useShm) && (bmpImage->width <= (width -
> descr->xSrc))
> + && (bmpImage->height <= (height - descr->ySrc)))
> {
> int saveRed, saveGreen, saveBlue;
The patch is wrapped, and you don't want to use XGetGeometry, this
incurs a server round-trip.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list