diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index 95600b0cd26..880d71ff740 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -1988,9 +1988,11 @@ DWORD X11DRV_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, GetObjectW( hbitmap, sizeof(bm), &bm ); width = min( width, bm.bmWidth - x ); height = min( height, bm.bmHeight - y ); + X11DRV_DIB_Lock( bitmap, DIB_Status_GdiMod ); wine_tsx11_lock(); image = XGetImage( gdi_display, bitmap->pixmap, x, y, width, height, AllPlanes, ZPixmap ); wine_tsx11_unlock(); + X11DRV_DIB_Unlock( bitmap, TRUE ); } else if (GetObjectType( dev->hdc ) == OBJ_MEMDC) { diff --git a/dlls/winex11.drv/dib.c b/dlls/winex11.drv/dib.c index b2e1c5f9c54..a1176d95342 100644 --- a/dlls/winex11.drv/dib.c +++ b/dlls/winex11.drv/dib.c @@ -101,8 +101,6 @@ enum Rle_EscapeCodes static INT X11DRV_DIB_Coerce(X_PHYSBITMAP *,INT); -static INT X11DRV_DIB_Lock(X_PHYSBITMAP *,INT); -static void X11DRV_DIB_Unlock(X_PHYSBITMAP *,BOOL); /* Some of the following helper functions are duplicated in @@ -4576,7 +4574,7 @@ static INT X11DRV_DIB_Coerce(X_PHYSBITMAP *physBitmap, INT req) /*********************************************************************** * X11DRV_DIB_Lock */ -static INT X11DRV_DIB_Lock(X_PHYSBITMAP *physBitmap, INT req) +INT X11DRV_DIB_Lock(X_PHYSBITMAP *physBitmap, INT req) { INT ret = DIB_Status_None; @@ -4592,7 +4590,7 @@ static INT X11DRV_DIB_Lock(X_PHYSBITMAP *physBitmap, INT req) /*********************************************************************** * X11DRV_DIB_Unlock */ -static void X11DRV_DIB_Unlock(X_PHYSBITMAP *physBitmap, BOOL commit) +void X11DRV_DIB_Unlock(X_PHYSBITMAP *physBitmap, BOOL commit) { if (!physBitmap->image) return; /* not a DIB section */ switch (physBitmap->status) diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index d1fbbf3505f..5c98d2e32e3 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -481,6 +481,8 @@ extern INT X11DRV_DIB_MaskToShift(DWORD mask) DECLSPEC_HIDDEN; extern INT X11DRV_CoerceDIBSection(X11DRV_PDEVICE *physDev,INT) DECLSPEC_HIDDEN; extern INT X11DRV_LockDIBSection(X11DRV_PDEVICE *physDev,INT) DECLSPEC_HIDDEN; extern void X11DRV_UnlockDIBSection(X11DRV_PDEVICE *physDev,BOOL) DECLSPEC_HIDDEN; +extern INT X11DRV_DIB_Lock(X_PHYSBITMAP *,INT) DECLSPEC_HIDDEN; +extern void X11DRV_DIB_Unlock(X_PHYSBITMAP *,BOOL) DECLSPEC_HIDDEN; extern void X11DRV_DIB_DeleteDIBSection(X_PHYSBITMAP *physBitmap, DIBSECTION *dib) DECLSPEC_HIDDEN; extern void X11DRV_DIB_CopyDIBSection(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physDevDst,