Re: winex11 - Fix X11DRV_DIB_GetImageBits() when target bitmaps are larger than fetched area
Peter Dons Tychsen <donpedro(a)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(a)winehq.org
participants (1)
-
Alexandre Julliard